diff options
author | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-11-21 22:26:53 +0000 |
---|---|---|
committer | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2004-11-21 22:26:53 +0000 |
commit | 84dc09773792de17d9b9fdf5737be6c0addfe1ac (patch) | |
tree | 455284ed52041a17011f5bbcb1ea69f1efd7ac0e /epan/sigcomp_state_hdlr.c | |
parent | 3c9227aabf5b2d34c36bd94baa1176ecb448eee4 (diff) |
Clean-up hash table at reloading of file.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12568 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/sigcomp_state_hdlr.c')
-rw-r--r-- | epan/sigcomp_state_hdlr.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/epan/sigcomp_state_hdlr.c b/epan/sigcomp_state_hdlr.c index c7b729fe1c..4b97411a37 100644 --- a/epan/sigcomp_state_hdlr.c +++ b/epan/sigcomp_state_hdlr.c @@ -374,6 +374,15 @@ static const guint8 sip_sdp_static_dictionaty_for_sigcomp[0x12e4] = }; static GHashTable *state_buffer_table=NULL; +
+static void
+state_buffer_table_cleanup(gpointer key _U_, gpointer value, gpointer user_data _U_){
+
+ guint8 *state_buff = value;
+
+ if ( state_buff )
+ g_free(state_buff);
+}
void sigcomp_init_udvm(void){ @@ -381,6 +390,10 @@ sigcomp_init_udvm(void){ gchar *partial_state_str; guint i; guint8 *sip_sdp_buff; +
+ /* Destroy any existing memory chunks / hashes. */
+ if (state_buffer_table)
+ g_hash_table_foreach(state_buffer_table, state_buffer_table_cleanup, NULL);
state_buffer_table = g_hash_table_new(g_str_hash, g_str_equal); |