From 1948fe69bd7d3dba547c1708653ec4fbc08655ac Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Tue, 30 Jun 2015 01:11:10 +0200 Subject: plugins: add cleanup routines Destroy the reassembly tables on exit, fix memleak in profinet dissector. Change-Id: Id34dbfde42fe715513997452f87cd4fdc328e294 --- plugins/opcua/opcua.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'plugins/opcua/opcua.c') 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); -- cgit v1.2.1