From: Christoph Hellwig Date: Sun, 19 Jul 2020 07:22:03 +0000 (+0200) Subject: sctp: switch sctp_setsockopt_auth_key to use memzero_explicit X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=89fae01eef8b1572c71d2cfcc3307c1f1e97b778;p=linux.git 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 Signed-off-by: David S. Miller --- diff --git a/net/sctp/socket.c b/net/sctp/socket.c index a573af7dfe41f..365145746b559 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; }