diff options
author | Anders Broman <anders.broman@ericsson.com> | 2010-06-03 08:22:08 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2010-06-03 08:22:08 +0000 |
commit | 5b2722c6b3f003faf99d683a1f4db257a8925eeb (patch) | |
tree | b7ad38e4ff55ac9a104419f9a25361108ce51d7d /epan/sigcomp_state_hdlr.c | |
parent | 9ea0a509b50bb826bf7d74338db08fea4340cbda (diff) |
Use g_hash_table_new_full().
svn path=/trunk/; revision=33072
Diffstat (limited to 'epan/sigcomp_state_hdlr.c')
-rw-r--r-- | epan/sigcomp_state_hdlr.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/epan/sigcomp_state_hdlr.c b/epan/sigcomp_state_hdlr.c index 7066c9adf0..e61847c517 100644 --- a/epan/sigcomp_state_hdlr.c +++ b/epan/sigcomp_state_hdlr.c @@ -609,18 +609,6 @@ static const guint8 presence_static_dictionary_for_sigcomp[PRESENCE_STATE_LENGTH static GHashTable *state_buffer_table=NULL; -static void -state_buffer_table_cleanup(gpointer key , gpointer value, gpointer user_data _U_){ - - guint8 *state_buff = value; - gchar *partial_state_str = key; - - if ( state_buff ){ - g_free(state_buff); - g_free(partial_state_str); - } - -} void sigcomp_init_udvm(void){ @@ -631,12 +619,14 @@ sigcomp_init_udvm(void){ /* Destroy any existing memory chunks / hashes. */ if (state_buffer_table){ - g_hash_table_foreach(state_buffer_table, state_buffer_table_cleanup, NULL); g_hash_table_destroy(state_buffer_table); } - state_buffer_table = g_hash_table_new(g_str_hash, g_str_equal); + state_buffer_table = g_hash_table_new_full(g_str_hash, + g_str_equal, + g_free, /* key_destroy_func */ + g_free); /* value_destroy_func */ /* * Store static dictionaries in hash table */ |