mirror of https://github.com/python/cpython
#3662: Fix segfault introduced when fixing memory leaks.
TESTED=./python -E -tt ./Lib/test/regrtest.py test_fileio R (approach from bug)=Amaury and Benjamin
This commit is contained in:
parent
dcf4891210
commit
901e4715bd
|
@ -227,6 +227,10 @@ class OtherFileTests(unittest.TestCase):
|
|||
except:
|
||||
pass
|
||||
|
||||
def testInvalidInit(self):
|
||||
self.assertRaises(TypeError, _fileio._FileIO, "1", 0, 0)
|
||||
|
||||
|
||||
def test_main():
|
||||
# Historically, these tests have been sloppy about removing TESTFN.
|
||||
# So get rid of it no matter what.
|
||||
|
|
|
@ -175,7 +175,7 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds)
|
|||
kwlist,
|
||||
Py_FileSystemDefaultEncoding,
|
||||
&name, &mode, &closefd))
|
||||
goto error;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue