createDRBlist(): return NULL if no active DRB
If there are no active bearers, the function previously returned an empty list. Return NULL if there are no bearers, so it is safe to call this function even when no bearers are present. We can also pass it every time to do_RRCReconfiguration(), which will not add an empty list for DRBs.
This commit is contained in:
@@ -429,6 +429,10 @@ static NR_DRB_ToAddModList_t *createDRBlist(gNB_RRC_UE_t *ue, bool reestablish)
|
||||
asn1cSeqAdd(&DRB_configList->list, DRB_config);
|
||||
}
|
||||
}
|
||||
if (DRB_configList->list.count == 0) {
|
||||
free(DRB_configList);
|
||||
return NULL;
|
||||
}
|
||||
return DRB_configList;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user