aboutsummaryrefslogtreecommitdiffstats
path: root/epan/wmem/wmem_list.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/wmem/wmem_list.c')
-rw-r--r--epan/wmem/wmem_list.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/epan/wmem/wmem_list.c b/epan/wmem/wmem_list.c
index df9f07ceee..592d51b432 100644
--- a/epan/wmem/wmem_list.c
+++ b/epan/wmem/wmem_list.c
@@ -173,6 +173,22 @@ wmem_list_new(wmem_allocator_t *allocator)
return list;
}
+void
+wmem_destroy_list(wmem_list_t *list)
+{
+ wmem_list_frame_t *cur, *next;
+
+ cur = list->head;
+
+ while (cur) {
+ next = cur->next;
+ wmem_free(list->allocator, cur);
+ cur = next;
+ }
+
+ wmem_free(list->allocator, list);
+}
+
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*