summaryrefslogtreecommitdiffstats
path: root/net/sctp
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-07-19 09:22:03 +0200
committerDavid S. Miller <davem@davemloft.net>2020-07-20 03:26:42 +0200
commit89fae01eef8b1572c71d2cfcc3307c1f1e97b778 (patch)
tree5b0425d182504c86d00a752964ac3f1df2ade12b /net/sctp
parentsctp: pass a kernel pointer to sctp_setsockopt_hmac_ident (diff)
downloadlinux-89fae01eef8b1572c71d2cfcc3307c1f1e97b778.tar.xz
linux-89fae01eef8b1572c71d2cfcc3307c1f1e97b778.zip
sctp: switch sctp_setsockopt_auth_key to use memzero_explicit
Switch from kzfree to sctp_setsockopt_auth_key + kfree to prepare for moving the kfree to common code. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/socket.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index a573af7dfe41..365145746b55 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -3649,7 +3649,8 @@ static int sctp_setsockopt_auth_key(struct sock *sk,
}
out:
- kzfree(authkey);
+ memzero_explicit(authkey, optlen);
+ kfree(authkey);
return ret;
}