X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fsctp%2Fendpointola.c;h=dbe5870a139eb0831cf6cf8f1a43f311707678d3;hb=07ab6b6274057612a056b5db754d9bcbd319d291;hp=c8cc24e282c38697ac1cddd072cb983670dd55d3;hpb=b1d2dc3c06d8da7d58fb43d7123a91c1d6a4f576;p=pandora-kernel.git diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c index c8cc24e282c3..dbe5870a139e 100644 --- a/net/sctp/endpointola.c +++ b/net/sctp/endpointola.c @@ -248,6 +248,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. */ @@ -270,6 +272,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);