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>
This commit is contained in:
Denis Efremov 2020-08-27 09:43:59 +03:00 committed by Herbert Xu
parent d83d631b18
commit 57059185fb

View File

@ -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;