From: zhong jiang Date: Wed, 4 Sep 2019 03:01:17 +0000 (+0800) Subject: crypto: marvell - Use kzfree rather than its implementation X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=18a0bb4aca81839578fef79c9bdef6710ed1c4dc;p=openwrt%2Fstaging%2Fblogic.git crypto: marvell - Use kzfree rather than its implementation Use kzfree instead of memset() + kfree(). Signed-off-by: zhong jiang Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/marvell/hash.c b/drivers/crypto/marvell/hash.c index 0f0ac851f4eb..a2b35fb0fb89 100644 --- a/drivers/crypto/marvell/hash.c +++ b/drivers/crypto/marvell/hash.c @@ -1148,8 +1148,7 @@ static int mv_cesa_ahmac_pad_init(struct ahash_request *req, } /* Set the memory region to 0 to avoid any leak. */ - memset(keydup, 0, keylen); - kfree(keydup); + kzfree(keydup); if (ret) return ret;