summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-tcap.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-tcap.c')
-rw-r--r--epan/dissectors/packet-tcap.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/epan/dissectors/packet-tcap.c b/epan/dissectors/packet-tcap.c
index 4b43feeea3..854c952782 100644
--- a/epan/dissectors/packet-tcap.c
+++ b/epan/dissectors/packet-tcap.c
@@ -3350,6 +3350,7 @@ proto_reg_handoff_tcap(void)
}
static void init_tcap(void);
+static void cleanup_tcap(void);
void
proto_register_tcap(void)
@@ -3687,7 +3688,7 @@ proto_register_tcap(void)
NULL, HFILL }},
/*--- End of included file: packet-tcap-hfarr.c ---*/
-#line 2143 "../../asn1/tcap/packet-tcap-template.c"
+#line 2144 "../../asn1/tcap/packet-tcap-template.c"
};
/* Setup protocol subtree array */
@@ -3736,7 +3737,7 @@ proto_register_tcap(void)
&ett_tcap_Associate_source_diagnostic,
/*--- End of included file: packet-tcap-ettarr.c ---*/
-#line 2153 "../../asn1/tcap/packet-tcap-template.c"
+#line 2154 "../../asn1/tcap/packet-tcap-template.c"
};
/*static enum_val_t tcap_options[] = {
@@ -3774,7 +3775,6 @@ proto_register_tcap(void)
/* Set default SSNs */
range_convert_str(&global_ssn_range, "", MAX_SSN);
- ssn_range = range_empty();
prefs_register_range_preference(tcap_module, "ssn", "SCCP SSNs",
"SCCP (and SUA) SSNs to decode as TCAP",
@@ -3809,6 +3809,7 @@ proto_register_tcap(void)
tcap_handle = create_dissector_handle(dissect_tcap, proto_tcap);
register_init_routine(&init_tcap);
+ register_cleanup_routine(&cleanup_tcap);
}
@@ -3829,16 +3830,17 @@ static void range_add_callback(guint32 ssn)
static void init_tcap(void)
{
- if (ssn_range) {
- range_foreach(ssn_range, range_delete_callback);
- g_free(ssn_range);
- }
-
ssn_range = range_copy(global_ssn_range);
range_foreach(ssn_range, range_add_callback);
tcapsrt_init_routine();
}
+static void cleanup_tcap(void)
+{
+ range_foreach(ssn_range, range_delete_callback);
+ g_free(ssn_range);
+}
+
static int
dissect_tcap_param(asn1_ctx_t *actx, proto_tree *tree, tvbuff_t *tvb, int offset)
{