From 19ba947d9abbd372c98dc1339e045e30c0a4d72f Mon Sep 17 00:00:00 2001 From: Dario Lombardo Date: Sun, 22 Jan 2017 21:36:39 +0100 Subject: dof: add shutdown routine. Change-Id: I91bc792302f61fd8f20fa41ec067534316e26074 Reviewed-on: https://code.wireshark.org/review/19742 Reviewed-by: Michael Mann Petri-Dish: Michael Mann Reviewed-by: Dario Lombardo --- epan/dissectors/packet-dof.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'epan') diff --git a/epan/dissectors/packet-dof.c b/epan/dissectors/packet-dof.c index d2cb747442..93ab19c8fc 100644 --- a/epan/dissectors/packet-dof.c +++ b/epan/dissectors/packet-dof.c @@ -12431,6 +12431,21 @@ static void dof_cleanup_routine(void) dof_trp_cleanup(); } +static void +dof_shutdown_routine(void) +{ + if (addr_port_to_id) + g_hash_table_destroy(addr_port_to_id); + if (dpp_opid_to_packet_data) + g_hash_table_destroy(dpp_opid_to_packet_data); + if (node_key_to_sid_id) + g_hash_table_destroy(node_key_to_sid_id); + if (sid_buffer_to_sid_id) + g_hash_table_destroy(sid_buffer_to_sid_id); + if (sid_id_to_sid_buffer) + g_hash_table_destroy(sid_id_to_sid_buffer); +} + /** * This is the first entry point into the dissector, called on program launch. */ @@ -12451,6 +12466,7 @@ void proto_register_dof(void) register_init_routine(&dof_reset_routine); register_cleanup_routine(&dof_cleanup_routine); + register_shutdown_routine(&dof_shutdown_routine); } /** -- cgit v1.2.3