提交 b884f8b9 编写于 作者: J Jussi Kivilinna 提交者: Herbert Xu

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: NJussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 dd6eec24
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册