Commit 5cde7f8c authored by Dong Anyuan's avatar Dong Anyuan

Fix Coverity Scan CID 300472 (Variable header going out of scope leaks the storage it points to.)

parent a00c364b
...@@ -103,11 +103,15 @@ void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_ch ...@@ -103,11 +103,15 @@ void flexran_agent_ue_state_change(mid_t mod_id, uint32_t rnti, uint8_t state_ch
} }
LOG_D(FLEXRAN_AGENT,"sent message with size %d\n", size); LOG_D(FLEXRAN_AGENT,"sent message with size %d\n", size);
free(header);
return; return;
error: error:
if (err_code != 0) if (err_code != 0)
LOG_E(FLEXRAN_AGENT, "Could not send UE state message becasue of %d for RNTI %x\n", LOG_E(FLEXRAN_AGENT, "Could not send UE state message becasue of %d for RNTI %x\n",
err_code, rnti); err_code, rnti);
if (header){
free(header);
}
} }
......
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