From 066559227dfebd5cf2b30813ef8c5380de79cc9b Mon Sep 17 00:00:00 2001 From: vijay chadachan Date: Thu, 31 Oct 2024 17:34:30 +0100 Subject: [PATCH] get_SIB1_NR: init pattern2 in sib1 servingCellConfigCommon if allocated in scc --- openair2/RRC/NR/nr_rrc_config.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openair2/RRC/NR/nr_rrc_config.c b/openair2/RRC/NR/nr_rrc_config.c index fcd74eef81..63e6e1374f 100644 --- a/openair2/RRC/NR/nr_rrc_config.c +++ b/openair2/RRC/NR/nr_rrc_config.c @@ -2568,7 +2568,10 @@ NR_BCCH_DL_SCH_Message_t *get_SIB1_NR(const NR_ServingCellConfigCommon_t *scc, AssertFatal(ServCellCom->tdd_UL_DL_ConfigurationCommon != NULL, "out of memory\n"); ServCellCom->tdd_UL_DL_ConfigurationCommon->referenceSubcarrierSpacing = scc->tdd_UL_DL_ConfigurationCommon->referenceSubcarrierSpacing; ServCellCom->tdd_UL_DL_ConfigurationCommon->pattern1 = scc->tdd_UL_DL_ConfigurationCommon->pattern1; - ServCellCom->tdd_UL_DL_ConfigurationCommon->pattern2 = scc->tdd_UL_DL_ConfigurationCommon->pattern2; + if (scc->tdd_UL_DL_ConfigurationCommon->pattern2) { + ServCellCom->tdd_UL_DL_ConfigurationCommon->pattern2 = calloc_or_fail(1, sizeof(struct NR_TDD_UL_DL_Pattern)); + *ServCellCom->tdd_UL_DL_ConfigurationCommon->pattern2 = *scc->tdd_UL_DL_ConfigurationCommon->pattern2; + } } ServCellCom->ss_PBCH_BlockPower = scc->ss_PBCH_BlockPower;