summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@toblux.com>2024-03-27 23:25:09 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2024-04-05 15:46:33 +0800
commit6e61ee1ca551292d8714c35c92a019c41db79e4e (patch)
tree254817447e0360ae3443ee8d46f26763e5881702 /crypto
parenta00dce05ba31fbea58ca64158e0601cdc99d8929 (diff)
crypto: jitter - Use kvfree_sensitive() to fix Coccinelle warning
Replace memzero_explicit() and kvfree() with kvfree_sensitive() to fix the following Coccinelle/coccicheck warning reported by kfree_sensitive.cocci: WARNING opportunity for kfree_sensitive/kvfree_sensitive Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/jitterentropy-kcapi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/jitterentropy-kcapi.c b/crypto/jitterentropy-kcapi.c
index 76edbf8af0ac..c24d4ff2b4a8 100644
--- a/crypto/jitterentropy-kcapi.c
+++ b/crypto/jitterentropy-kcapi.c
@@ -61,8 +61,7 @@ void *jent_kvzalloc(unsigned int len)
void jent_kvzfree(void *ptr, unsigned int len)
{
- memzero_explicit(ptr, len);
- kvfree(ptr);
+ kvfree_sensitive(ptr, len);
}
void *jent_zalloc(unsigned int len)