Wireshark-commits: [Wireshark-commits] master 126e02c: Call reassembly_table_destroy and move g_has
From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Fri, 3 Jul 2015 23:35:21 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=126e02cd58c08aa234cd8c9e0e0739f961f462d3 Submitter: Michael Mann (mmann78@xxxxxxxxxxxx) Changed: branch: master Repository: wireshark Commits: 126e02c by Peter Wu (peter@xxxxxxxxxxxxx): Call reassembly_table_destroy and move g_hash_table_destroy This patch moves g_hash_table_destroy calls from the init routine to the cleanup routine. Besides that, the conditional check for the hash table has been removed, assuming that init is always paired with a cleanup call. If reassembly_table_init is found, a reassembly_table_destroy call is prepended to the cleanup function as well. Comments have been removed from the init function as well as these did not seem to have additional value ("destroy hash table" is clear from the context). The changes were automatically generated using https://git.lekensteyn.nl/peter/wireshark-notes/diff/one-off/cleanup-rewrite.py?id=4d11f07180d9c115eb14bd860e9a47d82d3d1dcd Manually edited files (for assignment auditing): dvbci, ositp, sccp, tcp. Other files that needed special attention due to the use of register_postseq_cleanup_routine: - ipx: keep call, do not add another cleanup routine. - ncp: remove empty mncp_postseq_cleanup. mncp_hash_lookup is used even if a frame is visited before (see dissect_ncp_common), hence the hash table cannot be destroyed here. Do it in cleanup instead. - ndps: add cleanup routine to kill reassembly table, but do not destroy the hash table as it is already done in ndps_postseq_cleanup. Change-Id: I95a72b3df2978b2c13fefff6bd6821442193d0ed Reviewed-on: https://code.wireshark.org/review/9223 Reviewed-by: Michael Mann <mmann78@xxxxxxxxxxxx> Actions performed: from 80f7ee0 Call reassembly_table_destroy for some dissectors adds 126e02c Call reassembly_table_destroy and move g_hash_table_destroy Summary of changes: epan/dissectors/packet-afp.c | 13 +++++++------ epan/dissectors/packet-afs.c | 14 ++++++++------ epan/dissectors/packet-aoe.c | 16 +++++++--------- epan/dissectors/packet-arp.c | 18 ++++++++---------- epan/dissectors/packet-atalk.c | 12 +++++++----- epan/dissectors/packet-dcerpc-netlogon.c | 13 +++++++------ epan/dissectors/packet-dcerpc-nt.c | 15 ++++++--------- epan/dissectors/packet-dmp.c | 14 +++++++------- epan/dissectors/packet-dnp.c | 13 ++++++++----- epan/dissectors/packet-dvbci.c | 9 ++++++++- epan/dissectors/packet-enip.c | 13 ++++++++----- epan/dissectors/packet-fc.c | 12 ++++++++---- epan/dissectors/packet-fcdns.c | 10 +++++++--- epan/dissectors/packet-fcels.c | 10 +++++++--- epan/dissectors/packet-fcfcs.c | 10 +++++++--- epan/dissectors/packet-fcfzs.c | 10 +++++++--- epan/dissectors/packet-fcswils.c | 9 ++++++--- epan/dissectors/packet-gsm_sms.c | 11 ++++++++--- epan/dissectors/packet-ipx.c | 6 ++---- epan/dissectors/packet-iuup.c | 7 +++++-- epan/dissectors/packet-mgcp.c | 12 ++++++------ epan/dissectors/packet-ncp.c | 11 +++-------- epan/dissectors/packet-ndps.c | 15 +++++++++------ epan/dissectors/packet-netflow.c | 21 +++++++++------------ epan/dissectors/packet-ositp.c | 7 +++++++ epan/dissectors/packet-pdcp-lte.c | 29 ++++++++++------------------- epan/dissectors/packet-pvfs2.c | 10 +++++++--- epan/dissectors/packet-radius.c | 13 +++++++------ epan/dissectors/packet-rlc-lte.c | 29 ++++++++++------------------- epan/dissectors/packet-rohc.c | 12 +++++++----- epan/dissectors/packet-rpc.c | 14 ++++++++------ epan/dissectors/packet-rsvp.c | 10 +++++++--- epan/dissectors/packet-sbus.c | 8 +++++--- epan/dissectors/packet-sccp.c | 7 +++++++ epan/dissectors/packet-tcp.c | 7 +++++++ epan/dissectors/packet-zbee-nwk.c | 16 ++++++++++------ 36 files changed, 257 insertions(+), 199 deletions(-)
- Prev by Date: [Wireshark-commits] master 80f7ee0: Call reassembly_table_destroy for some dissectors
- Next by Date: [Wireshark-commits] master f5340b2: Split init routine into init/cleanup for more dissectors
- Previous by thread: [Wireshark-commits] master 80f7ee0: Call reassembly_table_destroy for some dissectors
- Next by thread: [Wireshark-commits] master f5340b2: Split init routine into init/cleanup for more dissectors
- Index(es):