Re: [PATCH v6] cypto: mediatek - fix leaks in mtk_desc_ring_alloc
From: Herbert Xu
Date: Fri Sep 25 2020 - 04:11:46 EST
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@xxxxxxxxxxxx>
> Signed-off-by: Xiaoliang Pang <dawning.pang@xxxxxxxxx>
> ---
> drivers/crypto/mediatek/mtk-platform.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Patch applied. Thanks.
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt