diff options
author | Dario Lombardo <lomato@gmail.com> | 2017-01-19 21:57:08 +0100 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-01-20 04:12:50 +0000 |
commit | f2c0248c2872314897f5bf16665985dff62129ba (patch) | |
tree | 953d7443a801ff376e0ad2512e4aa8f419ddef40 /epan | |
parent | 6bf8e5bf9eb33598b276c704d237d430f261d08d (diff) | |
download | wireshark-f2c0248c2872314897f5bf16665985dff62129ba.tar.gz |
follow-stream: add cleanup function.
Change-Id: Icfe7de118bc49da57f537601c2f256e4a028b4e2
Reviewed-on: https://code.wireshark.org/review/19680
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan')
-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 */ |