Commit 6ca6f147 authored by Neal Norwitz's avatar Neal Norwitz

Backport r55070: Stop using PyMem_FREE while the GIL is not held.

parent 27803cee
......@@ -6207,8 +6207,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