summaryrefslogtreecommitdiff
path: root/plugins/opcua
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2015-06-30 01:11:10 +0200
committerMichael Mann <mmann78@netscape.net>2015-07-03 23:38:46 +0000
commit7b33634cc562ba0ee75536b7dde4268a20d89bee (patch)
treeb6f3fc598b7ebad68dddb118651148cca7ed11f4 /plugins/opcua
parent3ad976896a983178fc42a0794f137983f528cde7 (diff)
downloadwireshark-7b33634cc562ba0ee75536b7dde4268a20d89bee.tar.gz
plugins: add cleanup routines
Destroy the reassembly tables on exit, fix memleak in profinet dissector. Change-Id: Id34dbfde42fe715513997452f87cd4fdc328e294 Reviewed-on: https://code.wireshark.org/review/9229 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'plugins/opcua')
-rw-r--r--plugins/opcua/opcua.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/opcua/opcua.c b/plugins/opcua/opcua.c
index acde1ab74b..9f1bd07f44 100644
--- a/plugins/opcua/opcua.c
+++ b/plugins/opcua/opcua.c
@@ -385,6 +385,12 @@ init_opcua(void)
&addresses_reassembly_table_functions);
}
+static void
+cleanup_opcua(void)
+{
+ reassembly_table_destroy(&opcua_reassembly_table);
+}
+
/** plugin entry functions.
* This registers the OpcUa protocol.
*/
@@ -443,6 +449,7 @@ void proto_register_opcua(void)
proto_register_field_array(proto_opcua, hf, array_length(hf));
register_init_routine(&init_opcua);
+ register_cleanup_routine(&cleanup_opcua);
/* register user preferences */
opcua_module = prefs_register_protocol(proto_opcua, proto_reg_handoff_opcua);