[PATCH v6] cypto: mediatek - fix leaks in mtk_desc_ring_alloc

Herbert Xu herbert at gondor.apana.org.au
Fri Sep 25 04:11:17 EDT 2020


On Mon, Sep 14, 2020 at 11:00:51AM +0800, Xiaoliang Pang wrote:
> In the init loop, if an error occurs in function 'dma_alloc_coherent',
> then goto the err_cleanup section, after run i--,
> in the array ring, the struct mtk_ring with index i will not be released,
> causing memory leaks
> 
> Fixes: 785e5c616c849 ("crypto: mediatek - Add crypto driver support for some MediaTek chips")
> Cc: Ryder Lee <ryder.lee at mediatek.com>
> Signed-off-by: Xiaoliang Pang <dawning.pang at gmail.com>
> ---
>  drivers/crypto/mediatek/mtk-platform.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert at gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



More information about the linux-arm-kernel mailing list