diff options
author | rubidium <rubidium@openttd.org> | 2013-11-24 15:02:05 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-11-24 15:02:05 +0000 |
commit | 3eecd246eb596b34daa50f23472faa1b1f77c0ee (patch) | |
tree | a17fb73bbd3a5b464f3929a4dbc74f76b21eff8e /src/fileio.cpp | |
parent | 83eeba28b7272a870f777f2f21bfc1def36e873f (diff) | |
download | openttd-3eecd246eb596b34daa50f23472faa1b1f77c0ee.tar.xz |
(svn r26087) -Fix: file descriptor leak when finding a corrupt tar
Diffstat (limited to 'src/fileio.cpp')
-rw-r--r-- | src/fileio.cpp | 1 |
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; } |