diff --git a/debian/libwireshark0.symbols b/debian/libwireshark0.symbols index 600a6711c4..c00bf5f024 100644 --- a/debian/libwireshark0.symbols +++ b/debian/libwireshark0.symbols @@ -246,6 +246,7 @@ libwireshark.so.0 libwireshark0 #MINVER# decode_as_list@Base 1.12.0~rc1 decode_bits_in_field@Base 1.9.1 decode_build_reset_list@Base 2.3.0 + decode_cleanup@Base 3.3.0 decode_clear_all@Base 2.3.0 decode_dcerpc_add_show_list@Base 1.12.0~rc1 decode_dcerpc_reset_all@Base 1.12.0~rc1 diff --git a/epan/decode_as.c b/epan/decode_as.c index d4442b76ab..5421d24273 100644 --- a/epan/decode_as.c +++ b/epan/decode_as.c @@ -524,10 +524,14 @@ decode_clear_all(void) g_slist_free(dissector_reset_list); dissector_reset_list = NULL; + decode_dcerpc_reset_all(); +} + +void +decode_cleanup(void) +{ g_list_free(decode_as_list); decode_as_list = NULL; - - decode_dcerpc_reset_all(); } /* diff --git a/epan/decode_as.h b/epan/decode_as.h index 9facdfb09f..2df629271f 100644 --- a/epan/decode_as.h +++ b/epan/decode_as.h @@ -133,6 +133,10 @@ WS_DLL_PUBLIC int save_decode_as_entries(gchar** err); */ WS_DLL_PUBLIC void decode_clear_all(void); +/** Frees memory used by "decode as" routines. Called at program shutdown. + */ +WS_DLL_PUBLIC void decode_cleanup(void); + /** This routine creates one entry in the list of protocol dissector * that need to be reset. It is called by the g_hash_table_foreach * routine once for each changed entry in a dissector table. diff --git a/epan/epan.c b/epan/epan.c index 77cd9c466e..1a4610d184 100644 --- a/epan/epan.c +++ b/epan/epan.c @@ -341,6 +341,7 @@ epan_cleanup(void) dfilter_cleanup(); decode_clear_all(); + decode_cleanup(); #ifdef HAVE_LUA /*