Commit ca1e8318 authored by Dong Anyuan's avatar Dong Anyuan

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

parent 525e0da7
...@@ -441,7 +441,12 @@ int flexran_agent_mac_stats_reply(mid_t mod_id, ...@@ -441,7 +441,12 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
for (j = 0; j < paging_report->n_paging_info; j++) { for (j = 0; j < paging_report->n_paging_info; j++) {
p_info[j] = malloc(sizeof(Protocol__FlexPagingInfo)); p_info[j] = malloc(sizeof(Protocol__FlexPagingInfo));
if(p_info[j] == NULL){ if (p_info[j] == NULL) {
for (k = 0; k < j; k++) {
free(p_info[k]);
}
free(p_info);
p_info = NULL;
free(paging_report); free(paging_report);
goto error; goto error;
} }
......
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