Commit 8a8bfddf authored by Dong Anyuan's avatar Dong Anyuan

Fix Coverity Scan CID 300499 (Variable paging_report going out of scope leaks...

Fix Coverity Scan CID 300499 (Variable paging_report going out of scope leaks the storage it points to.)
parent 1a542163
...@@ -407,14 +407,18 @@ int flexran_agent_mac_stats_reply(mid_t mod_id, ...@@ -407,14 +407,18 @@ int flexran_agent_mac_stats_reply(mid_t mod_id,
//Provide a report for each pending paging message //Provide a report for each pending paging message
Protocol__FlexPagingInfo **p_info; Protocol__FlexPagingInfo **p_info;
p_info = malloc(sizeof(Protocol__FlexPagingInfo *) * paging_report->n_paging_info); p_info = malloc(sizeof(Protocol__FlexPagingInfo *) * paging_report->n_paging_info);
if (p_info == NULL) if (p_info == NULL){
free(paging_report);
goto error; goto error;
}
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){
free(paging_report);
goto error; goto error;
}
protocol__flex_paging_info__init(p_info[j]); protocol__flex_paging_info__init(p_info[j]);
//TODO: Set paging index. This index is the same that will be used for the scheduling of the //TODO: Set paging index. This index is the same that will be used for the scheduling of the
//paging message by the controller //paging message by the controller
......
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