Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Synchronize with 'net' in order to sort out some l2tp, wireless, and ipv6 GRE fixes that will be built on top of in 'net-next'. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
@@ -249,6 +249,8 @@ void sctp_endpoint_free(struct sctp_endpoint *ep)
|
||||
/* Final destructor for endpoint. */
|
||||
static void sctp_endpoint_destroy(struct sctp_endpoint *ep)
|
||||
{
|
||||
int i;
|
||||
|
||||
SCTP_ASSERT(ep->base.dead, "Endpoint is not dead", return);
|
||||
|
||||
/* Free up the HMAC transform. */
|
||||
@@ -271,6 +273,9 @@ static void sctp_endpoint_destroy(struct sctp_endpoint *ep)
|
||||
sctp_inq_free(&ep->base.inqueue);
|
||||
sctp_bind_addr_free(&ep->base.bind_addr);
|
||||
|
||||
for (i = 0; i < SCTP_HOW_MANY_SECRETS; ++i)
|
||||
memset(&ep->secret_key[i], 0, SCTP_SECRET_SIZE);
|
||||
|
||||
/* Remove and free the port */
|
||||
if (sctp_sk(ep->base.sk)->bind_hash)
|
||||
sctp_put_port(ep->base.sk);
|
||||
|
@@ -3390,7 +3390,7 @@ static int sctp_setsockopt_auth_key(struct sock *sk,
|
||||
|
||||
ret = sctp_auth_set_key(sctp_sk(sk)->ep, asoc, authkey);
|
||||
out:
|
||||
kfree(authkey);
|
||||
kzfree(authkey);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user