Re: [PATCH] crypto: allwinner: sun8i-ce: fix two error path's memory leak

2020-11-19 Thread Herbert Xu
On Sun, Nov 15, 2020 at 07:08:07PM +, Corentin Labbe wrote: > This patch fixes the following smatch warnings: > drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c:412 > sun8i_ce_hash_run() warn: possible memory leak of 'result' > Note: "buf" is leaked as well. > > Furthermore, in case of

[PATCH] crypto: allwinner: sun8i-ce: fix two error path's memory leak

2020-11-15 Thread Corentin Labbe
This patch fixes the following smatch warnings: drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c:412 sun8i_ce_hash_run() warn: possible memory leak of 'result' Note: "buf" is leaked as well. Furthermore, in case of ENOMEM, crypto_finalize_hash_request() was not called which was an error. Fixes: