Commit e6a32c10 authored by tomita.y's avatar tomita.y

Fixed a problem of double free.

parent 909dfa4c
......@@ -769,7 +769,11 @@ pdcp_data_ind(
*/
if (nfapi_mode == 3) {
#ifdef UESIM_EXPANSION
if (UE_NAS_USE_TUN) {
((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = ctxt_pP->module_id;
} else {
((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = 0;
}
#else
((pdcp_data_ind_header_t*) new_sdu_p->data)->inst = ctxt_pP->module_id;
#endif
......
......@@ -109,7 +109,7 @@ int pdcp_fifo_flush_sdus(const protocol_ctxt_t *const ctxt_pP) {
int pdcp_nb_sdu_sent = 0;
int ret=0;
while ((sdu_p = list_get_head (&pdcp_sdu_list)) != NULL) {
while ((sdu_p = list_get_head (&pdcp_sdu_list)) != NULL && ((pdcp_data_ind_header_t *)(sdu_p->data))->inst == ctxt_pP->module_id) {
((pdcp_data_ind_header_t *)(sdu_p->data))->inst = 0;
int rb_id = ((pdcp_data_ind_header_t *)(sdu_p->data))->rb_id;
int sizeToWrite= sizeof (pdcp_data_ind_header_t) +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment