Fix Coverity Scan CID 300472 (Variable header going out of scope leaks the storage it points to.)
This commit is contained in:
@@ -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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user