summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorJeffy Chen <jeffy.chen@rock-chips.com>2017-09-27 15:28:57 +0300
committerMike Snitzer <snitzer@redhat.com>2017-09-28 19:19:02 +0300
commitbd86e32059526e2d0d13ca1e4447dfbbddb6e5cc (patch)
tree07211618e7cac8f71d3f820faf02e3ac692035c4 /drivers
parent62e082430ea4bb5b28909ca4375bb683931e22aa (diff)
downloadlinux-bd86e32059526e2d0d13ca1e4447dfbbddb6e5cc.tar.xz
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')
-rw-r--r--drivers/md/dm-crypt.c1
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: