aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-q931.c
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2015-06-28 13:06:31 +0200
committerMichael Mann <mmann78@netscape.net>2015-07-03 23:34:28 +0000
commit80f7ee063d371f0de989d51d40c6b4fabfbfb430 (patch)
tree9d69b4eb9445f73f88535f36be2374f528012b2d /epan/dissectors/packet-q931.c
parent750babc53acae3399f31d2160d6d719c51c8f222 (diff)
Call reassembly_table_destroy for some dissectors
This patch adds reassembly_table_destroy calls as cleanup function for dissectors which have a simple init routine that just calls reassembly_table_init (comments are ignored). The changes were automatically generated using https://git.lekensteyn.nl/peter/wireshark-notes/diff/one-off/cleanup-rewrite.py?id=4cc0aec05dc67a51926a045e1955b7a956757b5e (with the if and assignment parsers disabled). The only difference from the autogenerated output is that the XXX comments from the init routines in smb-pipe and tds dissectors are kept. Change-Id: I64aedf7189877247282b30b0e0f83757be6199e7 Reviewed-on: https://code.wireshark.org/review/9222 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-q931.c')
-rw-r--r--epan/dissectors/packet-q931.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/epan/dissectors/packet-q931.c b/epan/dissectors/packet-q931.c
index 96024e6262..6bbc054ed4 100644
--- a/epan/dissectors/packet-q931.c
+++ b/epan/dissectors/packet-q931.c
@@ -3189,11 +3189,15 @@ dissect_q931_ie_cs7(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
static void
q931_init(void) {
- /* Initialize the fragment and reassembly tables */
reassembly_table_init(&q931_reassembly_table,
&addresses_reassembly_table_functions);
}
+static void
+q931_cleanup(void) {
+ reassembly_table_destroy(&q931_reassembly_table);
+}
+
void
proto_register_q931(void)
{
@@ -3860,6 +3864,7 @@ proto_register_q931(void)
expert_q931 = expert_register_protocol(proto_q931);
expert_register_field_array(expert_q931, ei, array_length(ei));
register_init_routine(q931_init);
+ register_cleanup_routine(q931_cleanup);
q931_handle = register_dissector("q931", dissect_q931, proto_q931);
q931_tpkt_handle = register_dissector("q931.tpkt", dissect_q931_tpkt, proto_q931);