[PATCH v1 6/6] ReportsBase.cc: Fix Resource leak

Ryan Long ryan.long at oarcorp.com
Fri May 28 20:08:18 UTC 2021


CID 1503711: Resource leak in WriteSummaryReport().

Closes #4422
---
 tester/covoar/ReportsBase.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tester/covoar/ReportsBase.cc b/tester/covoar/ReportsBase.cc
index d904f8d..b4a755c 100644
--- a/tester/covoar/ReportsBase.cc
+++ b/tester/covoar/ReportsBase.cc
@@ -551,6 +551,8 @@ void  ReportsBase::WriteSummaryReport(
       100.0 - percentageBranches
     );
   }
+
+  fclose( report );
 }
 
 void GenerateReports(const std::string& symbolSetName)
-- 
1.8.3.1



More information about the devel mailing list