Fix: memory leak occurs when memblock is exhausted.
(cherry picked from commit 0e550a32e46d797d03fd72e54e474762d4db7614) # Conflicts: # openair2/LAYER2/RLC/rlc.c
This commit is contained in:
@@ -509,6 +509,7 @@ rlc_am_rx (
|
|||||||
|
|
||||||
default:
|
default:
|
||||||
LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT" TX UNKNOWN PROTOCOL STATE 0x%02X\n", PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP, rlc), rlc->protocol_state);
|
LOG_E(RLC, PROTOCOL_RLC_AM_CTXT_FMT" TX UNKNOWN PROTOCOL STATE 0x%02X\n", PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP, rlc), rlc->protocol_state);
|
||||||
|
list_free (&data_indP.data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -421,6 +421,7 @@ rlc_um_rx (const protocol_ctxt_t* const ctxt_pP, void *argP, struct mac_data_ind
|
|||||||
LOG_E(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TX UNKNOWN PROTOCOL STATE %02X hex\n",
|
LOG_E(RLC, PROTOCOL_RLC_UM_CTXT_FMT" TX UNKNOWN PROTOCOL STATE %02X hex\n",
|
||||||
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,l_rlc_p),
|
PROTOCOL_RLC_UM_CTXT_ARGS(ctxt_pP,l_rlc_p),
|
||||||
l_rlc_p->protocol_state);
|
l_rlc_p->protocol_state);
|
||||||
|
list_free (&data_indP.data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -441,6 +441,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
|
|||||||
return RLC_OP_STATUS_OK;
|
return RLC_OP_STATUS_OK;
|
||||||
} else {
|
} else {
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
||||||
|
free_mem_block(sdu_pP, __func__);
|
||||||
return RLC_OP_STATUS_INTERNAL_ERROR;
|
return RLC_OP_STATUS_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -465,6 +466,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
|
|||||||
return RLC_OP_STATUS_OK;
|
return RLC_OP_STATUS_OK;
|
||||||
} else {
|
} else {
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
||||||
|
free_mem_block(sdu_pP, __func__);
|
||||||
return RLC_OP_STATUS_INTERNAL_ERROR;
|
return RLC_OP_STATUS_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -487,6 +489,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
|
|||||||
} else {
|
} else {
|
||||||
//handle_event(ERROR,"FILE %s FONCTION rlc_data_req() LINE %s : out of memory\n", __FILE__, __LINE__);
|
//handle_event(ERROR,"FILE %s FONCTION rlc_data_req() LINE %s : out of memory\n", __FILE__, __LINE__);
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
||||||
|
free_mem_block(sdu_pP, __func__);
|
||||||
return RLC_OP_STATUS_INTERNAL_ERROR;
|
return RLC_OP_STATUS_INTERNAL_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -521,6 +524,7 @@ rlc_op_status_t rlc_data_req (const protocol_ctxt_t* const ctxt_pP,
|
|||||||
return RLC_OP_STATUS_OK;
|
return RLC_OP_STATUS_OK;
|
||||||
} else {
|
} else {
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RLC_DATA_REQ,VCD_FUNCTION_OUT);
|
||||||
|
free_mem_block(sdu_pP, __func__);
|
||||||
return RLC_OP_STATUS_BAD_PARAMETER;
|
return RLC_OP_STATUS_BAD_PARAMETER;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -299,6 +299,7 @@ void mac_rlc_data_ind (
|
|||||||
switch (rlc_mode) {
|
switch (rlc_mode) {
|
||||||
case RLC_MODE_NONE:
|
case RLC_MODE_NONE:
|
||||||
//handle_event(WARNING,"FILE %s FONCTION mac_rlc_data_ind() LINE %s : no radio bearer configured :%d\n", __FILE__, __LINE__, channel_idP);
|
//handle_event(WARNING,"FILE %s FONCTION mac_rlc_data_ind() LINE %s : no radio bearer configured :%d\n", __FILE__, __LINE__, channel_idP);
|
||||||
|
list_free (&data_ind.data);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RLC_MODE_AM:
|
case RLC_MODE_AM:
|
||||||
|
|||||||
Reference in New Issue
Block a user