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)
commitdbb018cd8a0fd073eaabf9de5a93f62d98bd7723
tree761c76f1fc6c81a51cd68adfe77108bed3c66dfd
parent7b51ba38d9baca207152d1c97ec793cfb673a6cd
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