]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: marvell - Fix memory leaks in TDMA chain for cipher requests
authorRomain Perier <romain.perier@free-electrons.com>
Fri, 22 Jul 2016 12:40:39 +0000 (14:40 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 28 Jul 2016 05:04:42 +0000 (13:04 +0800)
commite299089a39654920a0096e1dbc01ed14c8226dc8
tree165ec23b29c0f2a06adb6aadd9042e6c8a11c87d
parent03d48ad41cd8ed8b30500f675625ab94a469522e
crypto: marvell - Fix memory leaks in TDMA chain for cipher requests

So far in mv_cesa_ablkcipher_dma_req_init, if an error is thrown while
the tdma chain is built there is a memory leak. This issue exists
because the chain is assigned later at the end of the function, so the
cleanup function is called with the wrong version of the chain.

Fixes: e83dddb47f4a ("crypto: marvell/cesa - add TDMA support")
Signed-off-by: Romain Perier <romain.perier@free-electrons.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/marvell/cipher.c