*/
g_hash_table_remove(sub_dissectors->hash_table,
GUINT_TO_POINTER(pattern));
-
- /*
- * Now free up the entry.
- */
- g_free(dtbl_entry);
}
}
} else {
g_hash_table_remove(sub_dissectors->hash_table,
GUINT_TO_POINTER(pattern));
- g_free(dtbl_entry);
}
}
* Found - remove it.
*/
g_hash_table_remove(sub_dissectors->hash_table, pattern);
-
- /*
- * Now free up the entry.
- */
- g_free(dtbl_entry);
}
}
dtbl_entry->current = dtbl_entry->initial;
} else {
g_hash_table_remove(sub_dissectors->hash_table, pattern);
- g_free(dtbl_entry);
}
}
* XXX - there's no "g_uint_hash()" or "g_uint_equal()",
* so we use "g_direct_hash()" and "g_direct_equal()".
*/
- sub_dissectors->hash_table = g_hash_table_new( g_direct_hash,
- g_direct_equal );
+ sub_dissectors->hash_table = g_hash_table_new_full( g_direct_hash,
+ g_direct_equal,
+ NULL,
+ &g_free );
break;
case FT_STRING:
case FT_STRINGZ:
- sub_dissectors->hash_table = g_hash_table_new( g_str_hash,
- g_str_equal );
+ sub_dissectors->hash_table = g_hash_table_new_full( g_str_hash,
+ g_str_equal,
+ NULL,
+ &g_free );
break;
default: