diff options
Diffstat (limited to 'net/sctp/proc.c')
-rw-r--r-- | net/sctp/proc.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/net/sctp/proc.c b/net/sctp/proc.c index 4e45ee35d0db..0c83162a6bf8 100644 --- a/net/sctp/proc.c +++ b/net/sctp/proc.c | |||
@@ -134,9 +134,15 @@ static void sctp_seq_dump_local_addrs(struct seq_file *seq, struct sctp_ep_commo | |||
134 | struct sctp_af *af; | 134 | struct sctp_af *af; |
135 | 135 | ||
136 | if (epb->type == SCTP_EP_TYPE_ASSOCIATION) { | 136 | if (epb->type == SCTP_EP_TYPE_ASSOCIATION) { |
137 | asoc = sctp_assoc(epb); | 137 | asoc = sctp_assoc(epb); |
138 | peer = asoc->peer.primary_path; | 138 | |
139 | primary = &peer->saddr; | 139 | peer = asoc->peer.primary_path; |
140 | if (unlikely(peer == NULL)) { | ||
141 | WARN(1, "Association %p with NULL primary path!", asoc); | ||
142 | return; | ||
143 | } | ||
144 | |||
145 | primary = &peer->saddr; | ||
140 | } | 146 | } |
141 | 147 | ||
142 | rcu_read_lock(); | 148 | rcu_read_lock(); |