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

This commit is contained in:
Dong Anyuan
2019-05-28 22:18:45 +09:00
parent e65b702287
commit 554058d4b0
@@ -151,6 +151,15 @@ Protocol__FlexranMessage * flexran_agent_generate_diff_mac_stats_report(Protocol
return msg;
error:
if (stats_reply_msg) {
if (stats_reply_msg->ue_report) {
free(stats_reply_msg->ue_report);
}
if (stats_reply_msg->cell_report) {
free(stats_reply_msg->cell_report);
}
free(stats_reply_msg);
}
return NULL;
}