fix segfault RRU: check for nb_inst >0 before node_type

This commit is contained in:
Robert Schmidt
2019-03-14 14:24:16 +01:00
parent 62d9b8cf36
commit 13857c67e8
+2 -1
View File
@@ -688,7 +688,8 @@ int main( int argc, char **argv ) {
RCconfig_L1();
}
if (RC.rrc[0]->node_type == ngran_eNB_CU || RC.rrc[0]->node_type == ngran_ng_eNB_CU) {
if (RC.nb_inst > 0
&& (RC.rrc[0]->node_type == ngran_eNB_CU || RC.rrc[0]->node_type == ngran_ng_eNB_CU)) {
protocol_ctxt_t ctxt;
ctxt.module_id = 0 ;
ctxt.instance = 0;