Commit c3854df1 authored by Dong Anyuan's avatar Dong Anyuan

Fix Coverity Scan CID 300478 (Variable dl_report going out of scope leaks the...

Fix Coverity Scan CID 300478 (Variable dl_report going out of scope leaks the storage it points to.)
parent 130c8d3d
...@@ -185,8 +185,10 @@ int flexran_agent_mac_stats_reply(mid_t mod_id, ...@@ -185,8 +185,10 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
//Create the actual CSI reports. //Create the actual CSI reports.
Protocol__FlexDlCsi **csi_reports; Protocol__FlexDlCsi **csi_reports;
csi_reports = malloc(sizeof(Protocol__FlexDlCsi *)*dl_report->n_csi_report); csi_reports = malloc(sizeof(Protocol__FlexDlCsi *)*dl_report->n_csi_report);
if (csi_reports == NULL) if (csi_reports == NULL) {
free(dl_report);
goto error; goto error;
}
for (j = 0; j < dl_report->n_csi_report; j++) { for (j = 0; j < dl_report->n_csi_report; j++) {
csi_reports[j] = malloc(sizeof(Protocol__FlexDlCsi)); csi_reports[j] = malloc(sizeof(Protocol__FlexDlCsi));
......
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