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:
parent
9c0d2c3f7f
commit
1f12aaf07f
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue