From 527379af505ab25b77033407d0ab8f6dff6a59e4 Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Wed, 20 Jul 2011 20:31:22 +0200 Subject: Memory leak fixes (Bug #812497) (bzr r10483) --- buildtool.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'buildtool.cpp') diff --git a/buildtool.cpp b/buildtool.cpp index 2b4307ab0..983b2f8a4 100644 --- a/buildtool.cpp +++ b/buildtool.cpp @@ -6982,8 +6982,14 @@ public: } //## Make sure destination directory exists if (!createDirectory(destPath)) + { + if (f) + { + fclose(f); + } return false; - + } + //## Check whether it needs to be done String destName; if (destPath.size()>0) @@ -9793,7 +9799,8 @@ bool Make::parsePropertyFile(const String &fileName, { error("property file %s, line %d: expected keyword", fileName.c_str(), linenr); - return false; + fclose(f); + return false; } if (prefix.size() > 0) { -- cgit v1.2.3