]> granicus.if.org Git - python/commitdiff
Fix potential resource leak in test_mmap.
authorNadeem Vawda <nadeem.vawda@gmail.com>
Sat, 7 May 2011 12:35:05 +0000 (14:35 +0200)
committerNadeem Vawda <nadeem.vawda@gmail.com>
Sat, 7 May 2011 12:35:05 +0000 (14:35 +0200)
Lib/test/test_mmap.py

index 0a177c66a2bde19bc529606209356e94088379af..f7d6c6ff6509aeb69a5dae5776891c320fe7de5b 100644 (file)
@@ -664,6 +664,7 @@ class LargeMmapTests(unittest.TestCase):
             f.write(tail)
             f.flush()
         except (IOError, OverflowError):
+            f.close()
             raise unittest.SkipTest("filesystem does not have largefile support")
         return f