Code

Fix FD leak in buildtool.cpp
authorKrzysztof Kosiński <tweenk.pl@gmail.com>
Sun, 7 Feb 2010 01:43:12 +0000 (02:43 +0100)
committerKrzysztof Kosiński <tweenk.pl@gmail.com>
Sun, 7 Feb 2010 01:43:12 +0000 (02:43 +0100)
buildtool.cpp

index 538a6faa51c92a1619081bace877a7bc92082552..2b10f35777e791257e4e5c6e244950a527d80745 100644 (file)
@@ -5213,6 +5213,7 @@ bool MakeBase::copyFile(const String &srcFile, const String &destFile)
     FILE *destf = fopen(destNative.c_str(), "wb");
     if (!destf)
         {
+        fclose(srcf);
         error("copyFile cannot open %s for writing", srcNative.c_str());
         return false;
         }