提交 1dbc6a1e 编写于 作者: C Corentin Labbe 提交者: Herbert Xu

crypto: sun8i-ss - fix result memory leak on error path

This patch fixes a memory leak on an error path.

Fixes: d9b45418 ("crypto: sun8i-ss - support hash algorithms")
Reported-by: Nkernel test robot <lkp@intel.com>
Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NCorentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 4139fd58
......@@ -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;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册