diff --git a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c index 0985539f8ccb7b0f960be9e5e211cb59a7eb27b5..1e091feba57529cfc08b64505af9988f39d0bcc2 100644 --- a/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c +++ b/openair2/ENB_APP/CONTROL_MODULES/MAC/flexran_agent_mac.c @@ -1421,6 +1421,7 @@ void flexran_check_and_remove_slices(mid_t mod_id) /* don't update slice_config, it will be read in below */ /* we need to memcpy the higher slice to the position we just deleted */ memcpy(dl[i], dl[n_dl-1], sizeof(*dl[n_dl-1])); + memset(dl[n_dl-1], 0, sizeof(*dl[n_dl-1])); --sc_update[mod_id]->n_dl; } Protocol__FlexUlSlice **ul = sc_update[mod_id]->ul; @@ -1436,6 +1437,7 @@ void flexran_check_and_remove_slices(mid_t mod_id) mod_id, i, ul[i]->id); /* see DL remarks */ memcpy(ul[i], ul[n_ul-1], sizeof(*ul[n_ul-1])); + memset(ul[n_ul-1], 0, sizeof(*ul[n_ul-1])); --sc_update[mod_id]->n_ul; } }