aboutsummaryrefslogtreecommitdiffstats
path: root/net/sctp/endpointola.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sctp/endpointola.c')
-rw-r--r--net/sctp/endpointola.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c
index b26999d508ba..9e3d257de0e0 100644
--- a/net/sctp/endpointola.c
+++ b/net/sctp/endpointola.c
@@ -249,7 +249,10 @@ static void sctp_endpoint_destroy(struct sctp_endpoint *ep)
249{ 249{
250 struct sock *sk; 250 struct sock *sk;
251 251
252 SCTP_ASSERT(ep->base.dead, "Endpoint is not dead", return); 252 if (unlikely(!ep->base.dead)) {
253 WARN(1, "Attempt to destroy undead endpoint %p!\n", ep);
254 return;
255 }
253 256
254 /* Free the digest buffer */ 257 /* Free the digest buffer */
255 kfree(ep->digest); 258 kfree(ep->digest);