Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 251653
b: refs/heads/master
c: 8b4472c
h: refs/heads/master
i:
  251651: e40cdf0
v: v3
  • Loading branch information
Wei Yongjun authored and David S. Miller committed May 25, 2011
1 parent bf3f35e commit 38c1f10
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f11970e383acd6f505f492f1bc07fb1a4d884829
refs/heads/master: 8b4472cc13136d04727e399c6fdadf58d2218b0a
16 changes: 16 additions & 0 deletions trunk/net/sctp/associola.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
/* Forward declarations for internal functions. */
static void sctp_assoc_bh_rcv(struct work_struct *work);
static void sctp_assoc_free_asconf_acks(struct sctp_association *asoc);
static void sctp_assoc_free_asconf_queue(struct sctp_association *asoc);

/* Keep track of the new idr low so that we don't re-use association id
* numbers too fast. It is protected by they idr spin lock is in the
Expand Down Expand Up @@ -446,6 +447,9 @@ void sctp_association_free(struct sctp_association *asoc)
/* Free any cached ASCONF_ACK chunk. */
sctp_assoc_free_asconf_acks(asoc);

/* Free the ASCONF queue. */
sctp_assoc_free_asconf_queue(asoc);

/* Free any cached ASCONF chunk. */
if (asoc->addip_last_asconf)
sctp_chunk_free(asoc->addip_last_asconf);
Expand Down Expand Up @@ -1578,6 +1582,18 @@ int sctp_assoc_set_id(struct sctp_association *asoc, gfp_t gfp)
return error;
}

/* Free the ASCONF queue */
static void sctp_assoc_free_asconf_queue(struct sctp_association *asoc)
{
struct sctp_chunk *asconf;
struct sctp_chunk *tmp;

list_for_each_entry_safe(asconf, tmp, &asoc->addip_chunk_list, list) {
list_del_init(&asconf->list);
sctp_chunk_free(asconf);
}
}

/* Free asconf_ack cache */
static void sctp_assoc_free_asconf_acks(struct sctp_association *asoc)
{
Expand Down

0 comments on commit 38c1f10

Please sign in to comment.