Commit 18a0bb4a authored by zhong jiang's avatar zhong jiang Committed by Herbert Xu

crypto: marvell - Use kzfree rather than its implementation

Use kzfree instead of memset() + kfree().
Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent f2ef9602
...@@ -1148,8 +1148,7 @@ static int mv_cesa_ahmac_pad_init(struct ahash_request *req, ...@@ -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. */ /* Set the memory region to 0 to avoid any leak. */
memset(keydup, 0, keylen); kzfree(keydup);
kfree(keydup);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment