summaryrefslogtreecommitdiffstats
path: root/net/dccp
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@mandriva.com>2006-03-21 02:20:46 +0100
committerDavid S. Miller <davem@davemloft.net>2006-03-21 02:20:46 +0100
commitd5e9b2c737ecaedae66e3dffdd0d92d2a189ec5c (patch)
tree6858af7c1f4fd2388b7b83085a66c2dd39b12d5f /net/dccp
parent[DCCP] CCID: Allow ccid_{init,exit} to be NULL (diff)
downloadlinux-d5e9b2c737ecaedae66e3dffdd0d92d2a189ec5c.tar.xz
linux-d5e9b2c737ecaedae66e3dffdd0d92d2a189ec5c.zip
[DCCP] ackvec: Delete all the ack vector records in dccp_ackvec_free
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp')
-rw-r--r--net/dccp/ackvec.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/net/dccp/ackvec.c b/net/dccp/ackvec.c
index b4ff14f3d4f8..5c76e81658cf 100644
--- a/net/dccp/ackvec.c
+++ b/net/dccp/ackvec.c
@@ -159,7 +159,17 @@ void dccp_ackvec_free(struct dccp_ackvec *av)
{
if (unlikely(av == NULL))
return;
- WARN_ON(!list_empty(&av->dccpav_records));
+
+ if (!list_empty(&av->dccpav_records)) {
+ struct dccp_ackvec_record *avr, *next;
+
+ list_for_each_entry_safe(avr, next, &av->dccpav_records,
+ dccpavr_node) {
+ list_del_init(&avr->dccpavr_node);
+ dccp_ackvec_record_delete(avr);
+ }
+ }
+
kmem_cache_free(dccp_ackvec_slab, av);
}