Message ID | 1372445527-24414-84-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 9ef5c73..ea5c61a 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -4002,6 +4002,12 @@ SCTP_STATIC void sctp_destroy_sock(struct sock *sk) /* Release our hold on the endpoint. */ sp = sctp_sk(sk); + /* This could happen during socket init, thus we bail out + * early, since the rest of the below is not setup either. + */ + if (sp->ep == NULL) + return; + if (sp->do_auto_asconf) { sp->do_auto_asconf = 0; list_del(&sp->auto_asconf_list);