aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-fcdns.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-fcdns.c')
-rw-r--r--epan/dissectors/packet-fcdns.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/epan/dissectors/packet-fcdns.c b/epan/dissectors/packet-fcdns.c
index 8a9df627c2..61c02d749a 100644
--- a/epan/dissectors/packet-fcdns.c
+++ b/epan/dissectors/packet-fcdns.c
@@ -383,12 +383,15 @@ fcdns_hash (gconstpointer v)
static void
fcdns_init_protocol(void)
{
- if (fcdns_req_hash)
- g_hash_table_destroy(fcdns_req_hash);
-
fcdns_req_hash = g_hash_table_new(fcdns_hash, fcdns_equal);
}
+static void
+fcdns_cleanup_protocol(void)
+{
+ g_hash_table_destroy(fcdns_req_hash);
+}
+
static void
dissect_cos_flags (proto_tree *parent_tree, tvbuff_t *tvb, int offset, const header_field_info *hfinfo)
@@ -1854,6 +1857,7 @@ proto_register_fcdns (void)
expert_fcdns = expert_register_protocol(proto_fcdns);
expert_register_field_array(expert_fcdns, ei, array_length(ei));
register_init_routine (&fcdns_init_protocol);
+ register_cleanup_routine (&fcdns_cleanup_protocol);
dns_handle = new_create_dissector_handle (dissect_fcdns, proto_fcdns);
}