Commit 62eccc00 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 33300d31
......@@ -504,7 +504,7 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const ctxt_pP)
//int optval;
int bytes_received;
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;
//TTN for D2D (PC5S)
// receive a message from ProSe App
......@@ -680,6 +680,10 @@ void pdcp_fifo_read_input_sdus_frompc5s (const protocol_ctxt_t *const ctxt_pP)
break;
} /* end of switch */
}/* end of bytes_received > 0 */
if (pc5s_header != NULL) {
free(pc5s_header);
pc5s_header = NULL;
}
} /* 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