diff options
author | zhong jiang <zhongjiang@huawei.com> | 2019-09-04 05:39:11 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-09-05 13:06:04 +0300 |
commit | 60b3990c2cef8667a659e44accffc8da0144ea98 (patch) | |
tree | ce28f41f52f6465ee0423dfc0677267514642ff1 | |
parent | 10ae8f4e81d8af84bfe5d017b897a80fa4b27c8a (diff) | |
download | linux-60b3990c2cef8667a659e44accffc8da0144ea98.tar.xz |
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>
-rw-r--r-- | net/sunrpc/auth_gss/gss_krb5_keys.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/sunrpc/auth_gss/gss_krb5_keys.c b/net/sunrpc/auth_gss/gss_krb5_keys.c index 550fdf18d3b3..3b7f721c023b 100644 --- a/net/sunrpc/auth_gss/gss_krb5_keys.c +++ b/net/sunrpc/auth_gss/gss_krb5_keys.c @@ -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: |