[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210212084610.32185-1-clabbe.montjoie@gmail.com>
Date: Fri, 12 Feb 2021 09:46:10 +0100
From: Corentin Labbe <clabbe.montjoie@...il.com>
To: dan.carpenter@...cle.com, davem@...emloft.net,
herbert@...dor.apana.org.au, jernej.skrabec@...l.net,
lkp@...el.com, mripard@...nel.org, wens@...e.org
Cc: linux-arm-kernel@...ts.infradead.org, linux-crypto@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-sunxi@...glegroups.com,
Corentin Labbe <clabbe.montjoie@...il.com>
Subject: [PATCH] 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@...el.com>
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
Signed-off-by: Corentin Labbe <clabbe.montjoie@...il.com>
---
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-hash.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
}
--
2.26.2
Powered by blists - more mailing lists