From 1efef96e64d4577538ca0e1a7a7548b81dd5d152 Mon Sep 17 00:00:00 2001
From: Guido Casati <guido.casati@iis.fraunhofer.de>
Date: Mon, 10 Jan 2022 14:28:17 +0100
Subject: [PATCH] Using ASN_STRUCT_FREE instead of free

---
 openair2/GNB_APP/gnb_config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c
index f97b2061c6e..c6eab03ebdf 100644
--- a/openair2/GNB_APP/gnb_config.c
+++ b/openair2/GNB_APP/gnb_config.c
@@ -348,7 +348,7 @@ void fix_scc(NR_ServingCellConfigCommon_t *scc,uint64_t ssbmap) {
 
   lte_frame_type_t frame_type = get_frame_type((int)*scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0], *scc->ssbSubcarrierSpacing);
   if (frame_type == FDD) {
-    free(scc->tdd_UL_DL_ConfigurationCommon);
+    ASN_STRUCT_FREE(asn_DEF_NR_TDD_UL_DL_ConfigCommon, scc->tdd_UL_DL_ConfigurationCommon);
     scc->tdd_UL_DL_ConfigurationCommon = NULL;
   } else { // TDD
     if (scc->tdd_UL_DL_ConfigurationCommon->pattern2->dl_UL_TransmissionPeriodicity > 320 ) {
-- 
GitLab