From: Neal Norwitz Date: Mon, 19 Sep 2005 06:43:44 +0000 (+0000) Subject: Forward port fixes for problems reported by valgrind X-Git-Tag: v2.5a0~1362 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=24b3c229857faae7964bce5a1c59617a3e0690d0;p=thirdparty%2FPython%2Fcpython.git Forward port fixes for problems reported by valgrind --- diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 7319568241da..e1bdb1c8b395 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)