]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
sunrpc: Use kzfree rather than its implementation.
authorzhong jiang <zhongjiang@huawei.com>
Wed, 4 Sep 2019 02:39:11 +0000 (10:39 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Sep 2019 10:06:04 +0000 (12:06 +0200)
Use kzfree instead of memset() + kfree().

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

index 550fdf18d3b3cf6ad5daf36c1c04ada352b1aab8..3b7f721c023bbf7e786c4e6b805bac3fe2794f10 100644 (file)
@@ -228,14 +228,11 @@ u32 krb5_derive_key(const struct gss_krb5_enctype *gk5e,
        ret = 0;
 
 err_free_raw:
-       memset(rawkey, 0, keybytes);
-       kfree(rawkey);
+       kzfree(rawkey);
 err_free_out:
-       memset(outblockdata, 0, blocksize);
-       kfree(outblockdata);
+       kzfree(outblockdata);
 err_free_in:
-       memset(inblockdata, 0, blocksize);
-       kfree(inblockdata);
+       kzfree(inblockdata);
 err_free_cipher:
        crypto_free_sync_skcipher(cipher);
 err_return: