aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissector_filters.c11
-rw-r--r--epan/dissector_filters.h3
-rw-r--r--epan/epan.c2
3 files changed, 16 insertions, 0 deletions
diff --git a/epan/dissector_filters.c b/epan/dissector_filters.c
index 8b84f5ec15..13a02c6c44 100644
--- a/epan/dissector_filters.c
+++ b/epan/dissector_filters.c
@@ -62,6 +62,17 @@ struct conversation_filter_s* find_conversation_filter(const char *name)
return NULL;
}
+static void conversation_filter_free(gpointer p, gpointer user_data _U_)
+{
+ g_free(p);
+}
+
+void conversation_filters_cleanup(void)
+{
+ g_list_foreach(conv_filter_list, conversation_filter_free, NULL);
+ g_list_free(conv_filter_list);
+}
+
/*
* Editor modelines - http://www.wireshark.org/tools/modelines.html
*
diff --git a/epan/dissector_filters.h b/epan/dissector_filters.h
index fe5443b0de..44bca5d79b 100644
--- a/epan/dissector_filters.h
+++ b/epan/dissector_filters.h
@@ -46,6 +46,9 @@ WS_DLL_PUBLIC void register_conversation_filter(const char *proto_name, const ch
WS_DLL_PUBLIC struct conversation_filter_s* find_conversation_filter(const char *proto_name);
+/* Cleanup internal structures */
+extern void conversation_filters_cleanup(void);
+
/*** THE FOLLOWING SHOULD NOT BE USED BY ANY DISSECTORS!!! ***/
typedef struct conversation_filter_s {
diff --git a/epan/epan.c b/epan/epan.c
index 1252f1e793..1ad91b2395 100644
--- a/epan/epan.c
+++ b/epan/epan.c
@@ -60,6 +60,7 @@
#include "follow.h"
#include "disabled_protos.h"
#include "decode_as.h"
+#include "dissector_filters.h"
#ifdef HAVE_LUA
#include <lua.h>
@@ -209,6 +210,7 @@ epan_cleanup(void)
proto_cleanup();
prefs_cleanup();
decode_clear_all();
+ conversation_filters_cleanup();
packet_cleanup();
expert_cleanup();
capture_dissector_cleanup();