From 24b3c229857faae7964bce5a1c59617a3e0690d0 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Mon, 19 Sep 2005 06:43:44 +0000 Subject: [PATCH] Forward port fixes for problems reported by valgrind --- Modules/posixmodule.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 7319568241d..e1bdb1c8b39 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -1179,6 +1179,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)); } @@ -3012,7 +3013,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)