Skip to content

Commit 18a0bb4

Browse files
xiongzhongjiangherbertx
authored andcommitted
crypto: marvell - Use kzfree rather than its implementation
Use kzfree instead of memset() + kfree(). Signed-off-by: zhong jiang <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent f2ef960 commit 18a0bb4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/crypto/marvell/hash.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,8 +1148,7 @@ static int mv_cesa_ahmac_pad_init(struct ahash_request *req,
11481148
}
11491149

11501150
/* Set the memory region to 0 to avoid any leak. */
1151-
memset(keydup, 0, keylen);
1152-
kfree(keydup);
1151+
kzfree(keydup);
11531152

11541153
if (ret)
11551154
return ret;

0 commit comments

Comments
 (0)