summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/posixmodule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index a116c41d5e..0649854f55 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -1119,6 +1119,7 @@ posix_access(PyObject *self, PyObject *args)
Py_BEGIN_ALLOW_THREADS
res = access(path, mode);
Py_END_ALLOW_THREADS
+ PyMem_Free(path);
return(PyBool_FromLong(res == 0));
}
@@ -2950,7 +2951,7 @@ To both, return fd of newly opened pseudo-terminal.\n");
static PyObject *
posix_forkpty(PyObject *self, PyObject *noargs)
{
- int master_fd, pid;
+ int master_fd = -1, pid;
pid = forkpty(&master_fd, NULL, NULL, NULL);
if (pid == -1)