Commit 8e599681 authored by Dong Anyuan's avatar Dong Anyuan

Fix Coverity Scan CID 340247 (Variable pc5s_header going out of scope leaks...

Fix Coverity Scan CID 340247 (Variable pc5s_header going out of scope leaks the storage it points to.)
parent b40385aa
...@@ -504,7 +504,7 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const ctxt_pP) ...@@ -504,7 +504,7 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const ctxt_pP)
//int optval; //int optval;
int bytes_received; int bytes_received;
sidelink_pc5s_element *sl_pc5s_msg_send = NULL; sidelink_pc5s_element *sl_pc5s_msg_send = NULL;
pc5s_header_t *pc5s_header; pc5s_header_t *pc5s_header = NULL;
rb_id_t rab_id = 0; rb_id_t rab_id = 0;
//TTN for D2D (PC5S) //TTN for D2D (PC5S)
// receive a message from ProSe App // receive a message from ProSe App
...@@ -680,6 +680,10 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const ctxt_pP) ...@@ -680,6 +680,10 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const ctxt_pP)
break; break;
} /* end of switch */ } /* end of switch */
}/* end of bytes_received > 0 */ }/* end of bytes_received > 0 */
if (pc5s_header != NULL) {
free(pc5s_header);
pc5s_header = NULL;
}
} /* pdcp_fifo_read_input_sdus_frompc5s */ } /* pdcp_fifo_read_input_sdus_frompc5s */
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
......
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