Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sunrpc: Use kzfree rather than its implementation.

Use kzfree instead of memset() + kfree().

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

zhong jiang and committed by
David S. Miller
60b3990c 10ae8f4e

+3 -6
+3 -6
net/sunrpc/auth_gss/gss_krb5_keys.c
··· 228 228 ret = 0; 229 229 230 230 err_free_raw: 231 - memset(rawkey, 0, keybytes); 232 - kfree(rawkey); 231 + kzfree(rawkey); 233 232 err_free_out: 234 - memset(outblockdata, 0, blocksize); 235 - kfree(outblockdata); 233 + kzfree(outblockdata); 236 234 err_free_in: 237 - memset(inblockdata, 0, blocksize); 238 - kfree(inblockdata); 235 + kzfree(inblockdata); 239 236 err_free_cipher: 240 237 crypto_free_sync_skcipher(cipher); 241 238 err_return: