aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-12-06 22:26:10 +0000
committerGuy Harris <guy@alum.mit.edu>2005-12-06 22:26:10 +0000
commitd00581f4307ed9dcf7d7326653055c13e89363ee (patch)
treef884a002529f2347e567cdb9d72ca800977485b0 /epan
parent4fb23b89d48ca87b709d5edfa5543d09c90e1a53 (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. svn path=/trunk/; revision=16708
Diffstat (limited to 'epan')
-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;
}