summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-11-24 15:02:05 +0000
committerrubidium <rubidium@openttd.org>2013-11-24 15:02:05 +0000
commit3eecd246eb596b34daa50f23472faa1b1f77c0ee (patch)
treea17fb73bbd3a5b464f3929a4dbc74f76b21eff8e /src
parent83eeba28b7272a870f777f2f21bfc1def36e873f (diff)
downloadopenttd-3eecd246eb596b34daa50f23472faa1b1f77c0ee.tar.xz
(svn r26087) -Fix: file descriptor leak when finding a corrupt tar
Diffstat (limited to 'src')
-rw-r--r--src/fileio.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/fileio.cpp b/src/fileio.cpp
index a6cb85d74..3bc5cf768 100644
--- a/src/fileio.cpp
+++ b/src/fileio.cpp
@@ -781,6 +781,7 @@ bool TarScanner::AddFile(const char *filename, size_t basepath_length, const cha
if (memcmp(&th, &empty[0], 512) == 0) continue;
DEBUG(misc, 0, "The file '%s' isn't a valid tar-file", filename);
+ fclose(f);
return false;
}