aboutsummaryrefslogtreecommitdiffstats
path: root/epan/oid_resolv.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2005-12-06 22:26:10 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>2005-12-06 22:26:10 +0000
commita9c9b72550b0a97b8905d5124f0dd29696d66633 (patch)
treef884a002529f2347e567cdb9d72ca800977485b0 /epan/oid_resolv.c
parentf95f4c2c020f4903df9e8e3da274eeacf0ad44eb (diff)
The keys for entries in the OID-to-name hash table are g_mallocated, so
we have to g_free them when destroying the hash table. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16708 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/oid_resolv.c')
-rw-r--r--epan/oid_resolv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/epan/oid_resolv.c b/epan/oid_resolv.c
index 5b71ca6f27..753097ecb7 100644
--- a/epan/oid_resolv.c
+++ b/epan/oid_resolv.c
@@ -39,7 +39,13 @@ void oid_resolv_init(void) {
oid_table = g_hash_table_new(g_str_hash, g_str_equal);
}
+static void free_oid_str(gpointer key, gpointer value _U_,
+ gpointer user_data _U_) {
+ g_free(key);
+}
+
void oid_resolv_cleanup(void) {
+ g_hash_table_foreach(oid_table, free_oid_str, NULL);
g_hash_table_destroy(oid_table);
oid_table = NULL;
}