Skip to content

Commit

Permalink
sunrpc: 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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
xiongzhongjiang authored and davem330 committed Sep 5, 2019
1 parent 10ae8f4 commit 60b3990
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions net/sunrpc/auth_gss/gss_krb5_keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 60b3990

Please sign in to comment.