forked from osmocom/wireshark
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:
parent
baaff60b3b
commit
57f530a7fe
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue