crypto: sun8i-ss: fix result memory leak on error path
Corentin Labbe
maintainerPATCH 1/1 crypto: sun8i-ss: fix result memory leak on error path
This patch fixes a memory leak on an error path.
Fixes d9b45418a917 ("crypto: sun8i-ss - support hash algorithms")
Reported-by kernel test robot <[email protected]>
Reported-by Dan Carpenter <[email protected]>
Signed-off-by Corentin Labbe <[email protected]>
--- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c +1 -1
@@ -438,8 +438,8 @@ int sun8i_ss_hash_run(struct crypto_engine *engine, void *breq)kfree (pad);memcpy (areq->result, result, algt->alg.hash.halg.digestsize); -kfree (result); theend: +kfree (result);crypto_finalize_hash_request (engine, breq, err);return 0 ; }
Signature · 1 line
2.26.2
Herbert Xu
maintainerQuoted 9 lines · Corentin Labbe
This patch fixes a memory leak on an error path.
Fixes d9b45418a917 ("crypto: sun8i-ss - support hash algorithms")Reported-by kernel test robot <[email protected]>Reported-by Dan Carpenter <[email protected]>Signed-off-by Corentin Labbe <[email protected]>--- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt