Kaydet (Commit) d83eb316 authored tarafından Neal Norwitz's avatar Neal Norwitz

Stop using PyMem_FREE while the GIL is not held. For details see:

http://mail.python.org/pipermail/python-dev/2007-May/072896.html
üst c0a293c6
......@@ -30,6 +30,8 @@ extern "C" {
debugging info to dynamic memory blocks. The system routines have no idea
what to do with that stuff, and the Python wrappers have no idea what to do
with raw blocks obtained directly by the system routines then.
The GIL must be held when using these APIs.
*/
/*
......
......@@ -6296,8 +6296,8 @@ posix_fdopen(PyObject *self, PyObject *args)
#else
fp = fdopen(fd, mode);
#endif
PyMem_FREE(mode);
Py_END_ALLOW_THREADS
PyMem_FREE(mode);
if (fp == NULL)
return posix_error();
f = PyFile_FromFile(fp, "<fdopen>", orgmode, fclose);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment