diff options
Diffstat (limited to 'net/sctp/associola.c')
-rw-r--r-- | net/sctp/associola.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 1a21c571aa03..525f97c467e9 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c | |||
@@ -64,6 +64,7 @@ | |||
64 | /* Forward declarations for internal functions. */ | 64 | /* Forward declarations for internal functions. */ |
65 | static void sctp_assoc_bh_rcv(struct work_struct *work); | 65 | static void sctp_assoc_bh_rcv(struct work_struct *work); |
66 | static void sctp_assoc_free_asconf_acks(struct sctp_association *asoc); | 66 | static void sctp_assoc_free_asconf_acks(struct sctp_association *asoc); |
67 | static void sctp_assoc_free_asconf_queue(struct sctp_association *asoc); | ||
67 | 68 | ||
68 | /* Keep track of the new idr low so that we don't re-use association id | 69 | /* Keep track of the new idr low so that we don't re-use association id |
69 | * numbers too fast. It is protected by they idr spin lock is in the | 70 | * numbers too fast. It is protected by they idr spin lock is in the |
@@ -446,6 +447,9 @@ void sctp_association_free(struct sctp_association *asoc) | |||
446 | /* Free any cached ASCONF_ACK chunk. */ | 447 | /* Free any cached ASCONF_ACK chunk. */ |
447 | sctp_assoc_free_asconf_acks(asoc); | 448 | sctp_assoc_free_asconf_acks(asoc); |
448 | 449 | ||
450 | /* Free the ASCONF queue. */ | ||
451 | sctp_assoc_free_asconf_queue(asoc); | ||
452 | |||
449 | /* Free any cached ASCONF chunk. */ | 453 | /* Free any cached ASCONF chunk. */ |
450 | if (asoc->addip_last_asconf) | 454 | if (asoc->addip_last_asconf) |
451 | sctp_chunk_free(asoc->addip_last_asconf); | 455 | sctp_chunk_free(asoc->addip_last_asconf); |
@@ -1578,6 +1582,18 @@ retry: | |||
1578 | return error; | 1582 | return error; |
1579 | } | 1583 | } |
1580 | 1584 | ||
1585 | /* Free the ASCONF queue */ | ||
1586 | static void sctp_assoc_free_asconf_queue(struct sctp_association *asoc) | ||
1587 | { | ||
1588 | struct sctp_chunk *asconf; | ||
1589 | struct sctp_chunk *tmp; | ||
1590 | |||
1591 | list_for_each_entry_safe(asconf, tmp, &asoc->addip_chunk_list, list) { | ||
1592 | list_del_init(&asconf->list); | ||
1593 | sctp_chunk_free(asconf); | ||
1594 | } | ||
1595 | } | ||
1596 | |||
1581 | /* Free asconf_ack cache */ | 1597 | /* Free asconf_ack cache */ |
1582 | static void sctp_assoc_free_asconf_acks(struct sctp_association *asoc) | 1598 | static void sctp_assoc_free_asconf_acks(struct sctp_association *asoc) |
1583 | { | 1599 | { |