summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Efremov <efremov@linux.com>2020-08-27 08:43:59 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2020-09-04 09:57:16 +0200
commit57059185fb30978fea5c7eaf301d387feeaab3e1 (patch)
tree3d2880efcaa852cb376f7fa60fe4b7f6f6d39f79
parentcrypto: ccree - Simplify with dev_err_probe() (diff)
downloadlinux-57059185fb30978fea5c7eaf301d387feeaab3e1.tar.xz
linux-57059185fb30978fea5c7eaf301d387feeaab3e1.zip
crypto: inside-secure - use kfree_sensitive()
Use kfree_sensitive() instead of open-coding it. Signed-off-by: Denis Efremov <efremov@linux.com> Acked-by: Antoine Tenart <antoine.tenart@bootlin.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--drivers/crypto/inside-secure/safexcel_hash.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/crypto/inside-secure/safexcel_hash.c b/drivers/crypto/inside-secure/safexcel_hash.c
index 16a467969d8e..5ffdc1cd5847 100644
--- a/drivers/crypto/inside-secure/safexcel_hash.c
+++ b/drivers/crypto/inside-secure/safexcel_hash.c
@@ -1082,8 +1082,7 @@ static int safexcel_hmac_init_pad(struct ahash_request *areq,
}
/* Avoid leaking */
- memzero_explicit(keydup, keylen);
- kfree(keydup);
+ kfree_sensitive(keydup);
if (ret)
return ret;