summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-09-01 22:25:41 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-09-01 22:25:41 (GMT)
commitb5cb66542d76d303fe0f30ef194788e1fcfbba79 (patch)
tree57fc2a4072927d82b89fe5f6564b4b9eae8bb70a
parent14cc1e3222669d6a38aec67d8198a10a4ead4c8b (diff)
downloadcpython-b5cb66542d76d303fe0f30ef194788e1fcfbba79.zip
cpython-b5cb66542d76d303fe0f30ef194788e1fcfbba79.tar.gz
cpython-b5cb66542d76d303fe0f30ef194788e1fcfbba79.tar.bz2
SF patch #798534: Windows os.popen needlessly gets a reference to tuple ()
(Contributed by Andrew Gaul.) Fixes a minor leak.
-rw-r--r--Modules/posixmodule.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index b8bda3b..40526a4 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -3615,7 +3615,7 @@ static PyObject *_PyPopenProcs = NULL;
static PyObject *
posix_popen(PyObject *self, PyObject *args)
{
- PyObject *f, *s;
+ PyObject *f;
int tm = 0;
char *cmdstring;
@@ -3624,8 +3624,6 @@ posix_popen(PyObject *self, PyObject *args)
if (!PyArg_ParseTuple(args, "s|si:popen", &cmdstring, &mode, &bufsize))
return NULL;
- s = PyTuple_New(0);
-
if (*mode == 'r')
tm = _O_RDONLY;
else if (*mode != 'w') {