summaryrefslogtreecommitdiff
path: root/asn1/lte-rrc
diff options
context:
space:
mode:
Diffstat (limited to 'asn1/lte-rrc')
-rw-r--r--asn1/lte-rrc/packet-lte-rrc-template.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/asn1/lte-rrc/packet-lte-rrc-template.c b/asn1/lte-rrc/packet-lte-rrc-template.c
index f9cc583e36..85307c4628 100644
--- a/asn1/lte-rrc/packet-lte-rrc-template.c
+++ b/asn1/lte-rrc/packet-lte-rrc-template.c
@@ -2709,17 +2709,17 @@ dissect_lte_rrc_Handover_Preparation_Info(tvbuff_t *tvb, packet_info *pinfo, pro
static void
lte_rrc_init_protocol(void)
{
- if (lte_rrc_etws_cmas_dcs_hash) {
- g_hash_table_destroy(lte_rrc_etws_cmas_dcs_hash);
- }
- if (lte_rrc_system_info_value_changed_hash) {
- g_hash_table_destroy(lte_rrc_system_info_value_changed_hash);
- }
-
lte_rrc_etws_cmas_dcs_hash = g_hash_table_new(g_direct_hash, g_direct_equal);
lte_rrc_system_info_value_changed_hash = g_hash_table_new(g_direct_hash, g_direct_equal);
}
+static void
+lte_rrc_cleanup_protocol(void)
+{
+ g_hash_table_destroy(lte_rrc_etws_cmas_dcs_hash);
+ g_hash_table_destroy(lte_rrc_system_info_value_changed_hash);
+}
+
/*--- proto_register_rrc -------------------------------------------*/
void proto_register_lte_rrc(void) {
@@ -3409,6 +3409,7 @@ void proto_register_lte_rrc(void) {
#include "packet-lte-rrc-dis-reg.c"
register_init_routine(&lte_rrc_init_protocol);
+ register_cleanup_routine(&lte_rrc_cleanup_protocol);
}