summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorScott Graham <scottmg@chromium.org>2012-06-19 21:32:04 (GMT)
committerScott Graham <scottmg@chromium.org>2012-06-19 21:32:04 (GMT)
commitdd91094196ba8a824cd2f12ceec7e12452c4d32c (patch)
treea6704db098542eeaab8d45e13dc001a0b75f4858 /src
parent9ef56fd56f414bc6aa231b8d65cfa4ddec4cdedb (diff)
downloadNinja-dd91094196ba8a824cd2f12ceec7e12452c4d32c.zip
Ninja-dd91094196ba8a824cd2f12ceec7e12452c4d32c.tar.gz
Ninja-dd91094196ba8a824cd2f12ceec7e12452c4d32c.tar.bz2
don't leak file handle on fail-to-upgrade case
Diffstat (limited to 'src')
-rw-r--r--src/build_log.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/build_log.cc b/src/build_log.cc
index 02a9fb5..5eddf8f 100644
--- a/src/build_log.cc
+++ b/src/build_log.cc
@@ -235,6 +235,7 @@ bool BuildLog::Load(const string& path, string* err) {
if (log_version < kOldestSupportedVersion) {
*err = "unable to extract version from build log, perhaps due to "
"being too old; you must clobber your build output and rebuild";
+ fclose(file);
return false;
}
}