From ee177fedb4cdafe5c788b6972bac66ad6b316c94 Mon Sep 17 00:00:00 2001 From: Dario Lombardo Date: Wed, 25 Jan 2017 12:21:06 +0100 Subject: x11: add shutdown routine. Change-Id: I22b64a10ab3d0dcaccbea775b03ef3f82797697f Reviewed-on: https://code.wireshark.org/review/19784 Petri-Dish: Dario Lombardo Tested-by: Dario Lombardo Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- epan/dissectors/packet-x11.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/epan/dissectors/packet-x11.c b/epan/dissectors/packet-x11.c index 82bd4dfc16..ebad4a1967 100644 --- a/epan/dissectors/packet-x11.c +++ b/epan/dissectors/packet-x11.c @@ -5768,6 +5768,16 @@ dissect_x11(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) return tvb_captured_length(tvb); } +static void +x11_shutdown(void) +{ + g_hash_table_destroy(extension_table); + g_hash_table_destroy(error_table); + g_hash_table_destroy(event_table); + g_hash_table_destroy(genevent_table); + g_hash_table_destroy(reply_table); +} + /* Register the protocol with Wireshark */ void proto_register_x11(void) { @@ -5854,6 +5864,8 @@ void proto_register_x11(void) "Whether the X11 dissector should reassemble messages spanning multiple TCP segments. " "To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings.", &x11_desegment); + + register_shutdown_routine(x11_shutdown); } void -- cgit v1.2.1