diff options
Diffstat (limited to 'net/dccp')
-rw-r--r-- | net/dccp/ackvec.c | 12 |
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) | |||
159 | { | 159 | { |
160 | if (unlikely(av == NULL)) | 160 | if (unlikely(av == NULL)) |
161 | return; | 161 | return; |
162 | WARN_ON(!list_empty(&av->dccpav_records)); | 162 | |
163 | if (!list_empty(&av->dccpav_records)) { | ||
164 | struct dccp_ackvec_record *avr, *next; | ||
165 | |||
166 | list_for_each_entry_safe(avr, next, &av->dccpav_records, | ||
167 | dccpavr_node) { | ||
168 | list_del_init(&avr->dccpavr_node); | ||
169 | dccp_ackvec_record_delete(avr); | ||
170 | } | ||
171 | } | ||
172 | |||
163 | kmem_cache_free(dccp_ackvec_slab, av); | 173 | kmem_cache_free(dccp_ackvec_slab, av); |
164 | } | 174 | } |
165 | 175 | ||