Skip to content

Commit

Permalink
crypto: marvell - Use kzfree rather than its implementation
Browse files Browse the repository at this point in the history
Use kzfree instead of memset() + kfree().

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
zhong jiang authored and Herbert Xu committed Sep 9, 2019
1 parent f2ef960 commit 18a0bb4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/crypto/marvell/hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 18a0bb4

Please sign in to comment.