diff options
Diffstat (limited to 'epan/dissectors/packet-nbap.c')
-rw-r--r-- | epan/dissectors/packet-nbap.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/epan/dissectors/packet-nbap.c b/epan/dissectors/packet-nbap.c index 051e6c9250..0b9e78039d 100644 --- a/epan/dissectors/packet-nbap.c +++ b/epan/dissectors/packet-nbap.c @@ -55270,16 +55270,9 @@ static gint nbap_key_cmp(gconstpointer a_ptr, gconstpointer b_ptr, gpointer igno }*/ static void nbap_init(void){ - guint8 i; - /*Cleanup*/ - if(com_context_map){ - g_tree_destroy(com_context_map); - } - if(edch_flow_port_map){ - g_tree_destroy(edch_flow_port_map); - } - /*Initialize*/ - com_context_map = g_tree_new_full(nbap_key_cmp, + guint8 i; + /*Initialize*/ + com_context_map = g_tree_new_full(nbap_key_cmp, NULL, /* data pointer, optional */ NULL, /* function to free the memory allocated for the key used when removing the entry */ g_free); @@ -55292,9 +55285,16 @@ static void nbap_init(void){ g_free); for (i = 0; i < 15; i++) { - lchId_type_table[i+1] = *lch_contents[i]; - } + lchId_type_table[i+1] = *lch_contents[i]; + } +} + +static void nbap_cleanup(void){ + /*Cleanup*/ + g_tree_destroy(com_context_map); + g_tree_destroy(edch_flow_port_map); } + static int dissect_nbap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { @@ -70179,6 +70179,7 @@ void proto_register_nbap(void) nbap_proc_uout_dissector_table = register_dissector_table("nbap.proc.uout", "NBAP-ELEMENTARY-PROCEDURE UnsuccessfulOutcome", FT_STRING, BASE_NONE); register_init_routine(nbap_init); + register_cleanup_routine(nbap_cleanup); } /* @@ -71295,7 +71296,7 @@ proto_reg_handoff_nbap(void) /*--- End of included file: packet-nbap-dis-tab.c ---*/ -#line 555 "../../asn1/nbap/packet-nbap-template.c" +#line 556 "../../asn1/nbap/packet-nbap-template.c" } |