diff options
-rw-r--r-- | epan/epan.c | 2 | ||||
-rw-r--r-- | epan/follow.c | 13 | ||||
-rw-r--r-- | epan/follow.h | 4 |
3 files changed, 19 insertions, 0 deletions
diff --git a/epan/epan.c b/epan/epan.c index 182aae10f7..2625a2eb81 100644 --- a/epan/epan.c +++ b/epan/epan.c @@ -57,6 +57,7 @@ #include "exported_pdu.h" #include "export_object.h" #include "stat_tap_ui.h" +#include "follow.h" #ifdef HAVE_LUA #include <lua.h> @@ -211,6 +212,7 @@ epan_cleanup(void) export_pdu_cleanup(); export_object_cleanup(); stat_tap_table_cleanup(); + follow_cleanup(); #ifdef HAVE_LUA wslua_cleanup(); #endif diff --git a/epan/follow.c b/epan/follow.c index 415d3e7efc..1eb947d6c2 100644 --- a/epan/follow.c +++ b/epan/follow.c @@ -245,6 +245,19 @@ follow_tvb_tap_listener(void *tapdata, packet_info *pinfo, return FALSE; } +static void +clear_follower(gpointer p, gpointer user_data _U_) +{ + g_free(p); +} + +void +follow_cleanup(void) +{ + g_slist_foreach(registered_followers, clear_follower, NULL); + g_slist_free(registered_followers); +} + /* * Editor modelines - http://www.wireshark.org/tools/modelines.html * diff --git a/epan/follow.h b/epan/follow.h index 9101b32e2d..9725e637f5 100644 --- a/epan/follow.h +++ b/epan/follow.h @@ -211,6 +211,10 @@ WS_DLL_PUBLIC void follow_reset_stream(follow_info_t* info); */ WS_DLL_PUBLIC void follow_info_free(follow_info_t* follow_info); +/** Free the internal structures + */ +extern void follow_cleanup(void); + #ifdef __cplusplus } #endif /* __cplusplus */ |