mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 20:10:23 +09:00
crypto: sun8i-ss - fix result memory leak on error path
[ Upstream commit1dbc6a1e25] This patch fixes a memory leak on an error path. Fixes:d9b45418a9("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9c0d2c3f7f
commit
1f12aaf07f
@@ -437,8 +437,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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user