diff options
author | Jussi Kivilinna <jussi.kivilinna@mbnet.fi> | 2011-10-18 13:32:14 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2011-11-09 11:43:00 +0800 |
commit | 6a1796e3ac1e881ea482ed3d20aae4356e566eb9 (patch) | |
tree | aa709b86e8786e860224c9c222dbf165e81c5e54 /crypto | |
parent | 42329f631e5c7b0dc182e5f0408bb19e43fa45b9 (diff) | |
download | linux-crypto-6a1796e3ac1e881ea482ed3d20aae4356e566eb9.tar.gz linux-crypto-6a1796e3ac1e881ea482ed3d20aae4356e566eb9.zip |
crypto: lrw - fix memleak
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>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/lrw.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/lrw.c b/crypto/lrw.c index 358f80be..fca3246a 100644 --- 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; } |