Commit 72b485a2 authored by Robert Schmidt's avatar Robert Schmidt

Bugfix: set pointer to NULL after free

parent 463dfc66
......@@ -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));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment