]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
crypto: marvell/cesa - fix memory leak
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Sun, 18 Oct 2015 16:24:57 +0000 (17:24 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 20 Oct 2015 14:11:09 +0000 (22:11 +0800)
commit8c07f3a8c487df241f5e809e8f6d5dd7c9d75b54
tree611dc873e4151a7957b9fd0a5ff1c06e68dcc28c
parent8efbc2c0f6b4e52e384ecb1714511f0194c4d56a
crypto: marvell/cesa - fix memory leak

To: Boris Brezillon <boris.brezillon@free-electrons.com>,Arnaud Ebalard <arno@natisbad.org>,Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,Jason Cooper <jason@lakedaemon.net>

The local chain variable is not cleaned up if an error occurs in the middle
of DMA chain creation. Fix that by dropping the local chain variable and
using the dreq->chain field which will be cleaned up by
mv_cesa_dma_cleanup() in case of errors.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/marvell/hash.c