summaryrefslogtreecommitdiff
path: root/plugins/opcua/opcua.c
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2015-06-30 01:11:10 +0200
committerPeter Wu <peter@lekensteyn.nl>2015-07-03 23:54:45 +0200
commit1948fe69bd7d3dba547c1708653ec4fbc08655ac (patch)
tree220139bf21a43bb8a42fdac2f2e3507f9022fcd6 /plugins/opcua/opcua.c
parent57a150f307dbe0469ce3468ca6d4784d0e3f955c (diff)
downloadwireshark-1948fe69bd7d3dba547c1708653ec4fbc08655ac.tar.gz
plugins: add cleanup routinescleanup_routine
Destroy the reassembly tables on exit, fix memleak in profinet dissector. Change-Id: Id34dbfde42fe715513997452f87cd4fdc328e294
Diffstat (limited to 'plugins/opcua/opcua.c')
-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);