packet: free init/cleanup functions lists.

Change-Id: Ia28ceef189f8fe16105da88c01e1a159d5029c0a
Reviewed-on: https://code.wireshark.org/review/19655
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Dario Lombardo 2017-01-16 22:49:28 +01:00 committed by Michael Mann
parent baaff60b3b
commit 57f530a7fe
1 changed files with 8 additions and 6 deletions

View File

@ -121,6 +121,12 @@ struct depend_dissector_list {
/* Maps char *dissector_name to depend_dissector_list_t */
static GHashTable *depend_dissector_lists = NULL;
/* List of routines that are called before we make a pass through a capture file
* and dissect all its packets. See register_init_routine and
* register_cleanup_routine in packet.h */
static GSList *init_routines = NULL;
static GSList *cleanup_routines = NULL;
static void
destroy_depend_dissector_list(void *data)
{
@ -212,6 +218,8 @@ packet_cache_proto_handles(void)
void
packet_cleanup(void)
{
g_slist_free(init_routines);
g_slist_free(cleanup_routines);
g_hash_table_destroy(dissector_tables);
g_hash_table_destroy(registered_dissectors);
g_hash_table_destroy(depend_dissector_lists);
@ -237,12 +245,6 @@ set_actual_length(tvbuff_t *tvb, const guint specified_len)
}
}
/* List of routines that are called before we make a pass through a capture file
* and dissect all its packets. See register_init_routine and
* register_cleanup_routine in packet.h */
static GSList *init_routines = NULL;
static GSList *cleanup_routines = NULL;
void
register_init_routine(void (*func)(void))
{