diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2013-02-07 01:55:37 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-08 05:43:42 +0100 |
commit | 586c31f3bf04c290dc0a0de7fc91d20aa9a5ee53 (patch) | |
tree | 84d768747eb049ea3aab6fe7dcb26c0657a5a5d3 /net/sctp | |
parent | Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jesse/o... (diff) | |
download | linux-586c31f3bf04c290dc0a0de7fc91d20aa9a5ee53.tar.xz linux-586c31f3bf04c290dc0a0de7fc91d20aa9a5ee53.zip |
net: sctp: sctp_auth_key_put: use kzfree instead of kfree
For sensitive data like keying material, it is common practice to zero
out keys before returning the memory back to the allocator. Thus, use
kzfree instead of kfree.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Vlad Yasevich <vyasevich@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/auth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sctp/auth.c b/net/sctp/auth.c index 159b9bc5d633..d8420ae614dc 100644 --- a/net/sctp/auth.c +++ b/net/sctp/auth.c @@ -71,7 +71,7 @@ void sctp_auth_key_put(struct sctp_auth_bytes *key) return; if (atomic_dec_and_test(&key->refcnt)) { - kfree(key); + kzfree(key); SCTP_DBG_OBJCNT_DEC(keys); } } |