mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-13 22:25:03 +00:00
crypto: marvell - Use kzfree rather than its implementation
Use kzfree instead of memset() + kfree(). Signed-off-by: zhong jiang <zhongjiang@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
f2ef960231
commit
18a0bb4aca
1 changed files with 1 additions and 2 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue