Backport r55070: Stop using PyMem_FREE while the GIL is not held.
This commit is contained in:
parent
27803cee9a
commit
6ca6f1472c
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue