From 80f7ee063d371f0de989d51d40c6b4fabfbfb430 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Sun, 28 Jun 2015 13:06:31 +0200 Subject: 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 --- epan/dissectors/packet-sndcp.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'epan/dissectors/packet-sndcp.c') diff --git a/epan/dissectors/packet-sndcp.c b/epan/dissectors/packet-sndcp.c index 20fc3bf6a9..a3fb567098 100644 --- a/epan/dissectors/packet-sndcp.c +++ b/epan/dissectors/packet-sndcp.c @@ -109,6 +109,12 @@ sndcp_defragment_init(void) reassembly_table_init(&npdu_reassembly_table, &addresses_reassembly_table_functions); } +static void +sndcp_defragment_cleanup(void) +{ + reassembly_table_destroy(&npdu_reassembly_table); +} + /* value strings */ static const value_string nsapi_t[] = { @@ -555,6 +561,7 @@ proto_register_sndcp(void) proto_register_subtree_array(ett, array_length(ett)); register_dissector("sndcp", dissect_sndcp, proto_sndcp); register_init_routine(sndcp_defragment_init); + register_cleanup_routine(sndcp_defragment_cleanup); } /* If this dissector uses sub-dissector registration add a registration routine. -- cgit v1.2.3