mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 02:50:43 +00:00
[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>
This commit is contained in:
parent
411447019a
commit
d5e9b2c737
1 changed files with 11 additions and 1 deletions
|
@ -159,7 +159,17 @@ void dccp_ackvec_free(struct dccp_ackvec *av)
|
||||||
{
|
{
|
||||||
if (unlikely(av == NULL))
|
if (unlikely(av == NULL))
|
||||||
return;
|
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);
|
kmem_cache_free(dccp_ackvec_slab, av);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue