mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
Forward port fixes for problems reported by valgrind
This commit is contained in:
parent
f8948ca5d7
commit
24b3c22985
1 changed files with 2 additions and 1 deletions
|
|
@ -1179,6 +1179,7 @@ posix_access(PyObject *self, PyObject *args)
|
||||||
Py_BEGIN_ALLOW_THREADS
|
Py_BEGIN_ALLOW_THREADS
|
||||||
res = access(path, mode);
|
res = access(path, mode);
|
||||||
Py_END_ALLOW_THREADS
|
Py_END_ALLOW_THREADS
|
||||||
|
PyMem_Free(path);
|
||||||
return(PyBool_FromLong(res == 0));
|
return(PyBool_FromLong(res == 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3012,7 +3013,7 @@ To both, return fd of newly opened pseudo-terminal.\n");
|
||||||
static PyObject *
|
static PyObject *
|
||||||
posix_forkpty(PyObject *self, PyObject *noargs)
|
posix_forkpty(PyObject *self, PyObject *noargs)
|
||||||
{
|
{
|
||||||
int master_fd, pid;
|
int master_fd = -1, pid;
|
||||||
|
|
||||||
pid = forkpty(&master_fd, NULL, NULL, NULL);
|
pid = forkpty(&master_fd, NULL, NULL, NULL);
|
||||||
if (pid == -1)
|
if (pid == -1)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue