Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 97b40006 authored by Xiaoliang Pang's avatar Xiaoliang Pang Committed by Greg Kroah-Hartman
Browse files

cypto: mediatek - fix leaks in mtk_desc_ring_alloc



[ Upstream commit 228d284aac61283cde508a925d666f854b57af63 ]

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>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 189b3338
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment