From 6ca6f1472c8d9343f4f0fc8e45fc894c801ae4ca Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Wed, 9 May 2007 06:45:53 +0000 Subject: [PATCH] Backport r55070: Stop using PyMem_FREE while the GIL is not held. --- Modules/posixmodule.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index b984c3004a1..215930f2a28 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -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, "", orgmode, fclose);