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

2020-09-25 Thread Herbert Xu
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:

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

2020-09-13 Thread Xiaoliang Pang
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 Medi