]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: tcrypt - Fix memory leak in test_cipher
authorDarren Jenkins <darrenrjenkins@gmailcom>
Tue, 8 Jul 2008 07:51:44 +0000 (15:51 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 8 Jul 2008 07:51:44 +0000 (15:51 +0800)
commit5c30a14795fc9407a8a7ef9f7c1992ec59ac28d2
tree761c76f1fc6c81a51cd68adfe77108bed3c66dfd
parente889ed25a14a3072a6baab2c07f524df205b6315
crypto: tcrypt - Fix memory leak in test_cipher

Coverity CID: 2306 & 2307 RESOURCE_LEAK

In the second for loop in test_cipher(), data is allocated space with
kzalloc() and is only ever freed in an error case.
Looking at this loop, data is written to this memory but nothing seems
to read from it.
So here is a patch removing the allocation, I think this is the right
fix.

Only compile tested.

Signed-off-by: Darren Jenkins <darrenrjenkins@gmailcom>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/tcrypt.c