[PATCH] crypto: user - fix memory leak in crypto_reportstat

2019-10-04 Thread Navid Emamdoost
In crypto_reportstat, a new skb is created by nlmsg_new(). This skb is leaked if crypto_reportstat_alg() fails. Required release for skb is added. Fixes: cac5818c25d0 ("crypto: user - Implement a generic crypto statistics") Signed-off-by: Navid Emamdoost --- crypto/crypto_user_

[PATCH] crypto: user - fix memory leak in crypto_report

2019-10-04 Thread Navid Emamdoost
In crypto_report, a new skb is created via nlmsg_new(). This skb should be released if crypto_report_alg() fails. Fixes: a38f7907b926 ("crypto: Add userspace configuration API") Signed-off-by: Navid Emamdoost --- crypto/crypto_user_base.c | 4 +++- 1 file changed, 3 insertions(+),

[PATCH v2] crypto: ccp - Release all allocated memory if sha type is invalid

2019-09-19 Thread Navid Emamdoost
Release all allocated memory if sha type is invalid: In ccp_run_sha_cmd, if the type of sha is invalid, the allocated hmac_buf should be released. v2: fix the goto. Signed-off-by: Navid Emamdoost --- drivers/crypto/ccp/ccp-ops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH] crypto: ccp - release hmac_buf if ccp_run_sha_cmd fails

2019-09-13 Thread Navid Emamdoost
In ccp_run_sha_cmd, if the type of sha is invalid, the allocated hmac_buf should be released. Signed-off-by: Navid Emamdoost --- drivers/crypto/ccp/ccp-ops.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/ccp/ccp-ops.c b/drivers/crypto/ccp/ccp-ops.c index 9bc3c62157d7