aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/sctp/transport.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/sctp/transport.c b/net/sctp/transport.c
index 4e45bb68aef0..ca5331cc1ed2 100644
--- a/net/sctp/transport.c
+++ b/net/sctp/transport.c
@@ -168,10 +168,6 @@ static void sctp_transport_destroy_rcu(struct rcu_head *head)
168 struct sctp_transport *transport; 168 struct sctp_transport *transport;
169 169
170 transport = container_of(head, struct sctp_transport, rcu); 170 transport = container_of(head, struct sctp_transport, rcu);
171 if (transport->asoc)
172 sctp_association_put(transport->asoc);
173
174 sctp_packet_free(&transport->packet);
175 171
176 dst_release(transport->dst); 172 dst_release(transport->dst);
177 kfree(transport); 173 kfree(transport);
@@ -186,6 +182,11 @@ static void sctp_transport_destroy(struct sctp_transport *transport)
186 SCTP_ASSERT(transport->dead, "Transport is not dead", return); 182 SCTP_ASSERT(transport->dead, "Transport is not dead", return);
187 183
188 call_rcu(&transport->rcu, sctp_transport_destroy_rcu); 184 call_rcu(&transport->rcu, sctp_transport_destroy_rcu);
185
186 sctp_packet_free(&transport->packet);
187
188 if (transport->asoc)
189 sctp_association_put(transport->asoc);
189} 190}
190 191
191/* Start T3_rtx timer if it is not already running and update the heartbeat 192/* Start T3_rtx timer if it is not already running and update the heartbeat