From 70a85e1fa59a002112279d57fcca508f60dd748b Mon Sep 17 00:00:00 2001 From: Martin Kaiser Date: Tue, 9 Feb 2021 22:28:36 +0100 Subject: [PATCH] gsm_a_common: free stat table items The init functions of the gsm statistics tables call gsm_a_stat_init, which allocates some strings. We have to register gsm_a_stat_free_table_item to free these table items again. This is already done correctly for gsm_a_bssmap_stat_table. Fix it for the other tables. --- epan/dissectors/packet-gsm_a_common.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/epan/dissectors/packet-gsm_a_common.c b/epan/dissectors/packet-gsm_a_common.c index 948c200233..3444122a30 100644 --- a/epan/dissectors/packet-gsm_a_common.c +++ b/epan/dissectors/packet-gsm_a_common.c @@ -4894,7 +4894,7 @@ proto_register_gsm_a_common(void) gsm_a_dtap_mm_stat_init, gsm_a_dtap_mm_stat_packet, gsm_a_stat_reset, - NULL, + gsm_a_stat_free_table_item, NULL, sizeof(gsm_a_stat_fields)/sizeof(stat_tap_table_item), gsm_a_stat_fields, sizeof(gsm_a_stat_params)/sizeof(tap_param), gsm_a_stat_params, @@ -4910,7 +4910,7 @@ proto_register_gsm_a_common(void) gsm_a_dtap_rr_stat_init, gsm_a_dtap_rr_stat_packet, gsm_a_stat_reset, - NULL, + gsm_a_stat_free_table_item, NULL, sizeof(gsm_a_stat_fields)/sizeof(stat_tap_table_item), gsm_a_stat_fields, sizeof(gsm_a_stat_params)/sizeof(tap_param), gsm_a_stat_params, @@ -4926,7 +4926,7 @@ proto_register_gsm_a_common(void) gsm_a_dtap_cc_stat_init, gsm_a_dtap_cc_stat_packet, gsm_a_stat_reset, - NULL, + gsm_a_stat_free_table_item, NULL, sizeof(gsm_a_stat_fields)/sizeof(stat_tap_table_item), gsm_a_stat_fields, sizeof(gsm_a_stat_params)/sizeof(tap_param), gsm_a_stat_params, @@ -4942,7 +4942,7 @@ proto_register_gsm_a_common(void) gsm_a_dtap_gmm_stat_init, gsm_a_dtap_gmm_stat_packet, gsm_a_stat_reset, - NULL, + gsm_a_stat_free_table_item, NULL, sizeof(gsm_a_stat_fields)/sizeof(stat_tap_table_item), gsm_a_stat_fields, sizeof(gsm_a_stat_params)/sizeof(tap_param), gsm_a_stat_params, @@ -4958,7 +4958,7 @@ proto_register_gsm_a_common(void) gsm_a_dtap_sm_stat_init, gsm_a_dtap_sm_stat_packet, gsm_a_stat_reset, - NULL, + gsm_a_stat_free_table_item, NULL, sizeof(gsm_a_stat_fields)/sizeof(stat_tap_table_item), gsm_a_stat_fields, sizeof(gsm_a_stat_params)/sizeof(tap_param), gsm_a_stat_params, @@ -4974,7 +4974,7 @@ proto_register_gsm_a_common(void) gsm_a_dtap_sms_stat_init, gsm_a_dtap_sms_stat_packet, gsm_a_stat_reset, - NULL, + gsm_a_stat_free_table_item, NULL, sizeof(gsm_a_stat_fields)/sizeof(stat_tap_table_item), gsm_a_stat_fields, sizeof(gsm_a_stat_params)/sizeof(tap_param), gsm_a_stat_params, @@ -4990,7 +4990,7 @@ proto_register_gsm_a_common(void) gsm_a_dtap_tp_stat_init, gsm_a_dtap_tp_stat_packet, gsm_a_stat_reset, - NULL, + gsm_a_stat_free_table_item, NULL, sizeof(gsm_a_stat_fields)/sizeof(stat_tap_table_item), gsm_a_stat_fields, sizeof(gsm_a_stat_params)/sizeof(tap_param), gsm_a_stat_params, @@ -5006,7 +5006,7 @@ proto_register_gsm_a_common(void) gsm_a_dtap_ss_stat_init, gsm_a_dtap_ss_stat_packet, gsm_a_stat_reset, - NULL, + gsm_a_stat_free_table_item, NULL, sizeof(gsm_a_stat_fields)/sizeof(stat_tap_table_item), gsm_a_stat_fields, sizeof(gsm_a_stat_params)/sizeof(tap_param), gsm_a_stat_params, @@ -5022,7 +5022,7 @@ proto_register_gsm_a_common(void) gsm_a_sacch_rr_stat_init, gsm_a_sacch_rr_stat_packet, gsm_a_stat_reset, - NULL, + gsm_a_stat_free_table_item, NULL, sizeof(gsm_a_stat_fields)/sizeof(stat_tap_table_item), gsm_a_stat_fields, sizeof(gsm_a_stat_params)/sizeof(tap_param), gsm_a_stat_params,