Skip to content

Commit

Permalink
dm crypt: fix memory leak in crypt_ctr_cipher_old()
Browse files Browse the repository at this point in the history
Fix memory leak of cipher_api.

Fixes: 33d2f09 (dm crypt: introduce new format of cipher with "capi:" prefix)
Cc: stable@vger.kernel.org # 4.12+
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
  • Loading branch information
Jeffy Chen authored and Mike Snitzer committed Sep 28, 2017
1 parent 62e0824 commit bd86e32
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/md/dm-crypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2466,6 +2466,7 @@ static int crypt_ctr_cipher_old(struct dm_target *ti, char *cipher_in, char *key
kfree(cipher_api);
return ret;
}
kfree(cipher_api);

return 0;
bad_mem:
Expand Down

0 comments on commit bd86e32

Please sign in to comment.