diff options
author | Dario Lombardo <lomato@gmail.com> | 2017-02-03 23:49:27 +0100 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-02-04 01:31:55 +0000 |
commit | 92601c411a9780d7a343f2fd50817d318977abf9 (patch) | |
tree | 136c1483ee31e63fed6a88cc05308bfd9fb874c6 | |
parent | 6311657ff9104b517bde3c079d4bff3066ba9321 (diff) |
srt_table: add cleanup function.
Change-Id: I8d1e9d587f7d47a9064d7b2e0c89f31dc41854ea
Reviewed-on: https://code.wireshark.org/review/19946
Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r-- | epan/epan.c | 2 | ||||
-rw-r--r-- | epan/srt_table.c | 6 | ||||
-rw-r--r-- | epan/srt_table.h | 3 |
3 files changed, 11 insertions, 0 deletions
diff --git a/epan/epan.c b/epan/epan.c index a01e417c9a..f1451940f6 100644 --- a/epan/epan.c +++ b/epan/epan.c @@ -63,6 +63,7 @@ #include "dissector_filters.h" #include "conversation_table.h" #include "reassemble.h" +#include "srt_table.h" #ifdef HAVE_LUA #include <lua.h> @@ -224,6 +225,7 @@ epan_cleanup(void) stat_tap_table_cleanup(); follow_cleanup(); disabled_protos_cleanup(); + cleanup_srt_table(); #ifdef HAVE_LUA wslua_cleanup(); #endif diff --git a/epan/srt_table.c b/epan/srt_table.c index 63d58cca20..f4da2811b1 100644 --- a/epan/srt_table.c +++ b/epan/srt_table.c @@ -309,6 +309,12 @@ add_srt_table_data(srt_stat_table *rst, int indx, const nstime_t *req_time, pack time_stat_update(&rp->stats, &delta, pinfo); } +void +cleanup_srt_table(void) +{ + g_slist_free_full(registered_srt_tables, g_free); +} + /* * Editor modelines * diff --git a/epan/srt_table.h b/epan/srt_table.h index cc407d7d2d..9cd6e154ec 100644 --- a/epan/srt_table.h +++ b/epan/srt_table.h @@ -220,6 +220,9 @@ WS_DLL_PUBLIC void init_srt_table_row(srt_stat_table *rst, int proc_index, const */ WS_DLL_PUBLIC void add_srt_table_data(srt_stat_table *rst, int proc_index, const nstime_t *req_time, packet_info *pinfo); +/** Clean internal structures + */ +extern void cleanup_srt_table(void); #ifdef __cplusplus } |