* [PATCH] dm-crypt: Fix memory leak in crypt_ctr_cipher_old()
@ 2017-09-27 12:28 Jeffy Chen
2017-09-28 16:22 ` Mike Snitzer
0 siblings, 1 reply; 2+ messages in thread
From: Jeffy Chen @ 2017-09-27 12:28 UTC (permalink / raw)
To: linux-kernel
Cc: Jeffy Chen, Mike Snitzer, Alasdair Kergon, linux-raid, dm-devel,
Shaohua Li
Fix memory leak of cipher_api.
Fixes: 33d2f09fcb35 (dm crypt: introduce new format of cipher with "capi:" prefix)
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
drivers/md/dm-crypt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c
index a55ffd4f5933..04be8ce1742e 100644
--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -2467,6 +2467,7 @@ static int crypt_ctr_cipher_old(struct dm_target *ti, char *cipher_in, char *key
return ret;
}
+ kfree(cipher_api);
return 0;
bad_mem:
ti->error = "Cannot allocate cipher strings";
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: dm-crypt: Fix memory leak in crypt_ctr_cipher_old()
2017-09-27 12:28 [PATCH] dm-crypt: Fix memory leak in crypt_ctr_cipher_old() Jeffy Chen
@ 2017-09-28 16:22 ` Mike Snitzer
0 siblings, 0 replies; 2+ messages in thread
From: Mike Snitzer @ 2017-09-28 16:22 UTC (permalink / raw)
To: Jeffy Chen; +Cc: linux-kernel, Alasdair Kergon, dm-devel
On Wed, Sep 27 2017 at 8:28am -0400,
Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
> Fix memory leak of cipher_api.
>
> Fixes: 33d2f09fcb35 (dm crypt: introduce new format of cipher with "capi:" prefix)
> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Thanks, I've picked this up and it'll go upstream in my next pull
request for 4.14-rc
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-28 16:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-27 12:28 [PATCH] dm-crypt: Fix memory leak in crypt_ctr_cipher_old() Jeffy Chen
2017-09-28 16:22 ` Mike Snitzer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox