diff options
author | 2017-09-27 20:28:57 +0800 | |
---|---|---|
committer | 2017-09-28 12:19:02 -0400 | |
commit | bd86e32059526e2d0d13ca1e4447dfbbddb6e5cc (patch) | |
tree | 07211618e7cac8f71d3f820faf02e3ac692035c4 /drivers/md | |
parent | dm ioctl: fix alignment of event number in the device list (diff) | |
download | linux-bd86e32059526e2d0d13ca1e4447dfbbddb6e5cc.tar.gz linux-bd86e32059526e2d0d13ca1e4447dfbbddb6e5cc.tar.bz2 linux-bd86e32059526e2d0d13ca1e4447dfbbddb6e5cc.zip |
dm crypt: fix memory leak in crypt_ctr_cipher_old()
Fix memory leak of cipher_api.
Fixes: 33d2f09fcb35 (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>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm-crypt.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index a55ffd4f5933..75341fdca4b6 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -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: |