aboutsummaryrefslogtreecommitdiff
path: root/drivers/crypto/allwinner/sun8i-ss
diff options
context:
space:
mode:
authorCorentin Labbe2021-02-12 09:46:10 +0100
committerHerbert Xu2021-03-07 15:13:17 +1100
commit1dbc6a1e25be8575d6c4114d1d2b841a796507f7 (patch)
treea0569a97af61b0482e2704071079400f99e49586 /drivers/crypto/allwinner/sun8i-ss
parent4139fd587320da311fca9c4da231dc850d4f4a22 (diff)
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 <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/allwinner/sun8i-ss')
-rw-r--r--drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c
index 11cbcbc83a7b..0b9aa24a5edd 100644
--- a/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c
+++ b/drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c
@@ -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;
}