aboutsummaryrefslogtreecommitdiffstats
path: root/epan/wmem/wmem_tree.h
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2017-03-04 08:26:22 -0500
committerMichael Mann <mmann78@netscape.net>2017-03-05 03:39:00 +0000
commitb7d6cca4aeffcf8df55d6fa2e4417b731923ac8c (patch)
tree4a8660df14e76488bb4892b3bbe6c77b6fd0980c /epan/wmem/wmem_tree.h
parent9b4f325132091c053131b352df914f378286809a (diff)
Add wmem_tree_destroy
Allows the cleanup of NULL scoped wmem trees Change-Id: I7c49a224ca7e2f7ddfe0e38d3ea0e79aa2cb057c Reviewed-on: https://code.wireshark.org/review/20382 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/wmem/wmem_tree.h')
-rw-r--r--epan/wmem/wmem_tree.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/epan/wmem/wmem_tree.h b/epan/wmem/wmem_tree.h
index bcb7fdf783..b02ba320d0 100644
--- a/epan/wmem/wmem_tree.h
+++ b/epan/wmem/wmem_tree.h
@@ -72,6 +72,11 @@ wmem_tree_t *
wmem_tree_new_autoreset(wmem_allocator_t *master, wmem_allocator_t *slave)
G_GNUC_MALLOC;
+/** Cleanup memory used by tree. Intended for NULL scope allocated trees */
+WS_DLL_PUBLIC
+void
+wmem_tree_destroy(wmem_tree_t *tree, gboolean free_keys, gboolean free_values);
+
/** Returns true if the tree is empty (has no nodes). */
WS_DLL_PUBLIC
gboolean