summaryrefslogtreecommitdiff
path: root/net/sctp/socket.c
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-19 18:26:42 -0700
commit89fae01eef8b1572c71d2cfcc3307c1f1e97b778 (patch)
tree5b0425d182504c86d00a752964ac3f1df2ade12b /net/sctp/socket.c
parent3564ef442a174e42b58a215a55e4f0ef56b5fbb0 (diff)
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/socket.c')
-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;
}