Skip to content
Commit 228d284a authored by Xiaoliang Pang's avatar Xiaoliang Pang Committed by Herbert Xu
Browse files

cypto: mediatek - fix leaks in mtk_desc_ring_alloc



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: 785e5c61 ("crypto: mediatek - Add crypto driver support for some MediaTek chips")
Cc: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: default avatarXiaoliang Pang <dawning.pang@gmail.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 406346d2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment