Skip to content

Commit

Permalink
[DCCP] ackvec: Delete all the ack vector records in dccp_ackvec_free
Browse files Browse the repository at this point in the history
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Arnaldo Carvalho de Melo authored and David S. Miller committed Mar 21, 2006
1 parent 4114470 commit d5e9b2c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion net/dccp/ackvec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit d5e9b2c

Please sign in to comment.