]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Forward port fixes for problems reported by valgrind
authorNeal Norwitz <nnorwitz@gmail.com>
Mon, 19 Sep 2005 06:43:44 +0000 (06:43 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Mon, 19 Sep 2005 06:43:44 +0000 (06:43 +0000)
Modules/posixmodule.c

index 7319568241da604a2c4e09609206560fed3dbb02..e1bdb1c8b395b1c192a6c11b350918a4cbd24a21 100644 (file)
@@ -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)