crypto: sun8i-ss - fix result memory leak on error path
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>
This commit is contained in:
parent
4139fd5873
commit
1dbc6a1e25
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user