bugfix: bzero was not called if allocating memory
This commit is contained in:
+11
-11
@@ -68,17 +68,17 @@ void mac_top_init_eNB(void)
|
|||||||
RC.nb_macrlc_inst * sizeof(eNB_MAC_INST *),
|
RC.nb_macrlc_inst * sizeof(eNB_MAC_INST *),
|
||||||
RC.nb_macrlc_inst, sizeof(eNB_MAC_INST));
|
RC.nb_macrlc_inst, sizeof(eNB_MAC_INST));
|
||||||
for (i = 0; i < RC.nb_macrlc_inst; i++) {
|
for (i = 0; i < RC.nb_macrlc_inst; i++) {
|
||||||
if (RC.mac[i] == NULL)
|
if (RC.mac[i] == NULL) {
|
||||||
RC.mac[i] = (eNB_MAC_INST *) malloc16(sizeof(eNB_MAC_INST));
|
RC.mac[i] = (eNB_MAC_INST *) malloc16(sizeof(eNB_MAC_INST));
|
||||||
AssertFatal(RC.mac != NULL,
|
AssertFatal(RC.mac[i] != NULL,
|
||||||
"can't ALLOCATE %zu Bytes for %d eNB_MAC_INST with size %zu \n",
|
"can't ALLOCATE %zu Bytes for %d eNB_MAC_INST with size %zu \n",
|
||||||
RC.nb_macrlc_inst * sizeof(eNB_MAC_INST *),
|
RC.nb_macrlc_inst * sizeof(eNB_MAC_INST *),
|
||||||
RC.nb_macrlc_inst, sizeof(eNB_MAC_INST));
|
RC.nb_macrlc_inst, sizeof(eNB_MAC_INST));
|
||||||
LOG_D(MAC,
|
LOG_D(MAC,
|
||||||
"[MAIN] ALLOCATE %zu Bytes for %d eNB_MAC_INST @ %p\n",
|
"[MAIN] ALLOCATE %zu Bytes for %d eNB_MAC_INST @ %p\n",
|
||||||
sizeof(eNB_MAC_INST), RC.nb_macrlc_inst, RC.mac);
|
sizeof(eNB_MAC_INST), RC.nb_macrlc_inst, RC.mac);
|
||||||
if (RC.mac[i] == NULL) bzero(RC.mac[i], sizeof(eNB_MAC_INST));
|
bzero(RC.mac[i], sizeof(eNB_MAC_INST));
|
||||||
// bzero(RC.mac[i], sizeof(eNB_MAC_INST));
|
}
|
||||||
RC.mac[i]->Mod_id = i;
|
RC.mac[i]->Mod_id = i;
|
||||||
for (j = 0; j < MAX_NUM_CCs; j++) {
|
for (j = 0; j < MAX_NUM_CCs; j++) {
|
||||||
RC.mac[i]->DL_req[j].dl_config_request_body.
|
RC.mac[i]->DL_req[j].dl_config_request_body.
|
||||||
|
|||||||
Reference in New Issue
Block a user