From 7420b70240586b700f5cadfa0bbdffbbe6cb8e5a Mon Sep 17 00:00:00 2001 From: Nadeem Vawda Date: Sat, 7 May 2011 14:35:05 +0200 Subject: [PATCH] Fix potential resource leak in test_mmap. --- Lib/test/test_mmap.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Lib/test/test_mmap.py b/Lib/test/test_mmap.py index 0a177c66a2b..f7d6c6ff650 100644 --- a/Lib/test/test_mmap.py +++ b/Lib/test/test_mmap.py @@ -664,6 +664,7 @@ def _make_test_file(self, num_zeroes, tail): f.write(tail) f.flush() except (IOError, OverflowError): + f.close() raise unittest.SkipTest("filesystem does not have largefile support") return f