Fix memory leaks in zlib.compress() and .decompress().

Also, make sure that test_zlib tests decompress() for overly-large inputs.
This commit is contained in:
Nadeem Vawda 2011-05-14 23:07:36 +02:00
parent d8eab60c00
commit 154bdf92fc
2 changed files with 12 additions and 14 deletions

View file

@ -193,6 +193,7 @@ class CompressTestCase(BaseCompressTestCase, unittest.TestCase):
data = b'x' * size
try:
self.assertRaises(OverflowError, zlib.compress, data, 1)
self.assertRaises(OverflowError, zlib.decompress, data)
finally:
data = None