aboutsummaryrefslogtreecommitdiffstats
path: root/epan/reassemble.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2005-04-15 20:15:03 +0000
committerGerald Combs <gerald@wireshark.org>2005-04-15 20:15:03 +0000
commit5eb73dd01b886effe76d65af0dc757f7a1ea92ad (patch)
tree6a9c9618e3fc1171ff59efeae3b967b9212872c3 /epan/reassemble.c
parent46d347ed7e013844b5f1ecdc7ee035960d2b9116 (diff)
In fragment_unhash(), free our key data _after_ we remove the key from
the hash table so that fragment_equal() doesn't end up working with recently-freed data. svn path=/trunk/; revision=14096
Diffstat (limited to 'epan/reassemble.c')
-rw-r--r--epan/reassemble.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/epan/reassemble.c b/epan/reassemble.c
index 949c028652..b8d6a8ac15 100644
--- a/epan/reassemble.c
+++ b/epan/reassemble.c
@@ -490,15 +490,15 @@ static void
fragment_unhash(GHashTable *fragment_table, fragment_key *key)
{
/*
- * Free up the copies of the addresses from the old key.
+ * Remove the entry from the fragment table.
*/
- g_free((gpointer)key->src.data);
- g_free((gpointer)key->dst.data);
+ g_hash_table_remove(fragment_table, key);
/*
- * Remove the entry from the fragment table.
+ * Free up the copies of the addresses from the old key.
*/
- g_hash_table_remove(fragment_table, key);
+ g_free((gpointer)key->src.data);
+ g_free((gpointer)key->dst.data);
/*
* Free the key itself.