projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd6eec2
)
crypto: lrw - fix memleak
author
Jussi Kivilinna
<jussi.kivilinna@mbnet.fi>
Tue, 18 Oct 2011 10:32:14 +0000
(13:32 +0300)
committer
Herbert Xu
<herbert@gondor.apana.org.au>
Wed, 9 Nov 2011 03:43:00 +0000
(11:43 +0800)
LRW module leaks child cipher memory when init_tfm() fails because of child
block size not being 16.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/lrw.c
patch
|
blob
|
history
diff --git
a/crypto/lrw.c
b/crypto/lrw.c
index 358f80be2bf97d128ebd648887325a01ea051a70..fca3246a953faddc063141bbd153c9fcad5df684 100644
(file)
--- a/
crypto/lrw.c
+++ b/
crypto/lrw.c
@@
-220,6
+220,7
@@
static int init_tfm(struct crypto_tfm *tfm)
if (crypto_cipher_blocksize(cipher) != 16) {
*flags |= CRYPTO_TFM_RES_BAD_BLOCK_LEN;
+ crypto_free_cipher(cipher);
return -EINVAL;
}