summaryrefslogtreecommitdiff
path: root/net/sctp/socket.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-17 12:00:22 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-17 12:00:22 -0700
commitbf32d52c455d933cc9a459bb94af9ea8b5850af9 (patch)
tree0d6af119b141e46e120ad06c867fe82ac3c00f1c /net/sctp/socket.c
parent0c375501be6e6dc23c11ebfa394434517444e62d (diff)
parent7d132055814ef17a6c7b69f342244c410a5e000f (diff)
Merge 3.10-rc6 into tty-next
We want the changes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r--net/sctp/socket.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index f631c5ff4dbf..6abb1caf9836 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -4003,6 +4003,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);