From: Loganaden Velvindron Date: Thu, 8 Jun 2017 13:50:04 +0000 (+0100) Subject: crypto : asymmetric_keys : verify_pefile:zero memory content before freeing X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=da7798a7b6714cf35ea6084ad6b1fe0497566cf2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git crypto : asymmetric_keys : verify_pefile:zero memory content before freeing Signed-off-by: Loganaden Velvindron Signed-off-by: Yasir Auleear Signed-off-by: David Howells Signed-off-by: James Morris --- diff --git a/crypto/asymmetric_keys/verify_pefile.c b/crypto/asymmetric_keys/verify_pefile.c index 672a94c2c3ff..d178650fd524 100644 --- a/crypto/asymmetric_keys/verify_pefile.c +++ b/crypto/asymmetric_keys/verify_pefile.c @@ -381,7 +381,7 @@ static int pefile_digest_pe(const void *pebuf, unsigned int pelen, } error: - kfree(desc); + kzfree(desc); error_no_desc: crypto_free_shash(tfm); kleave(" = %d", ret); @@ -450,6 +450,6 @@ int verify_pefile_signature(const void *pebuf, unsigned pelen, ret = pefile_digest_pe(pebuf, pelen, &ctx); error: - kfree(ctx.digest); + kzfree(ctx.digest); return ret; }