diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index 73bb02a575..d764f7cb86 100644 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -700,8 +700,11 @@ static void modlist_coreset(NR_ControlResourceSet_t *source, NR_ControlResourceS if (id == *target->tci_StatesPDCCH_ToAddList->list.array[j]) break; } - if (j == target->tci_StatesPDCCH_ToAddList->list.count) - ASN_SEQUENCE_ADD(&target->tci_StatesPDCCH_ToAddList->list, source->tci_StatesPDCCH_ToAddList->list.array[i]); + if (j == target->tci_StatesPDCCH_ToAddList->list.count) { + long *tci_id = calloc(1, sizeof(*tci_id)); + *tci_id = id; + ASN_SEQUENCE_ADD(&target->tci_StatesPDCCH_ToAddList->list, tci_id); + } } } else UPDATE_IE(target->tci_StatesPDCCH_ToAddList,