From 72b485a2fe5e7a2d017592c4374bdb8e224e9318 Mon Sep 17 00:00:00 2001 From: Robert Schmidt Date: Thu, 30 Nov 2023 15:45:45 +0100 Subject: [PATCH] Bugfix: set pointer to NULL after free --- openair2/RRC/NR_UE/rrc_UE.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index d77cfd6a47..78febdcae8 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -689,8 +689,8 @@ static int8_t nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message(instance_t instance, switch (bcch_message->message.choice.c1->present) { case NR_BCCH_DL_SCH_MessageType__c1_PR_systemInformationBlockType1: LOG_D(NR_RRC, "[UE %ld] Decoding SIB1\n", instance); - if(SI_info->sib1) - ASN_STRUCT_FREE(asn_DEF_NR_SIB1, SI_info->sib1); + ASN_STRUCT_FREE(asn_DEF_NR_SIB1, SI_info->sib1); + SI_info->sib1 = NULL; NR_SIB1_t *sib1 = bcch_message->message.choice.c1->choice.systemInformationBlockType1; if(!SI_info->sib1) SI_info->sib1 = calloc(1, sizeof(*SI_info->sib1));