[SCTP] Clean up the T3_rtx timer when deleting a transport.
Linux Kernel Mailing List <[email protected]>
| Newsgroups | gmane.linux.kernel.commits.2-4 |
|---|---|
| Message-ID | <[email protected]> |
ChangeSet 1.1530.1.16, 2004/12/28 16:21:53-08:00, [email protected] [SCTP] Clean up the T3_rtx timer when deleting a transport. Signed-off-by: Vladislav Yasevich <[email protected]> Signed-off-by: Sridhar Samudrala <[email protected]> transport.c | 10 ++++++++++ 1 files changed, 10 insertions(+) diff -Nru a/net/sctp/transport.c b/net/sctp/transport.c --- a/net/sctp/transport.c 2005-01-15 07:05:39 -08:00 +++ b/net/sctp/transport.c 2005-01-15 07:05:39 -08:00 @@ -155,6 +155,16 @@ if (del_timer(&transport->hb_timer)) sctp_transport_put(transport); + /* Delete the T3_rtx timer if it's active. + * There is no point in not doing this now and letting + * structure hang around in memory since we know + * the tranport is going away. + */ + if (timer_pending(&transport->T3_rtx_timer) && + del_timer(&transport->T3_rtx_timer)) + sctp_transport_put(transport); + + sctp_transport_put(transport); }