summaryrefslogtreecommitdiffstats
path: root/Modules/xreadlinesmodule.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2001-03-23 18:30:19 (GMT)
committerGuido van Rossum <guido@python.org>2001-03-23 18:30:19 (GMT)
commit9dee48f6e7f080626d06ea8847834a7506935c97 (patch)
tree293df7e0f61af8aedb3e64f3350156798158a084 /Modules/xreadlinesmodule.c
parent559f6680c27f346c89e6dd29ba3235f7719ea6a7 (diff)
downloadcpython-9dee48f6e7f080626d06ea8847834a7506935c97.zip
cpython-9dee48f6e7f080626d06ea8847834a7506935c97.tar.gz
cpython-9dee48f6e7f080626d06ea8847834a7506935c97.tar.bz2
Fix a memory leak -- there's no need to INCREF() the result of
newreadlinesobject() in xreadlines().
Diffstat (limited to 'Modules/xreadlinesmodule.c')
-rw-r--r--Modules/xreadlinesmodule.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/Modules/xreadlinesmodule.c b/Modules/xreadlinesmodule.c
index 4cdef8a..db9e243 100644
--- a/Modules/xreadlinesmodule.c
+++ b/Modules/xreadlinesmodule.c
@@ -50,7 +50,6 @@ xreadlines(PyObject *self, PyObject *args)
if (!PyArg_ParseTuple(args, "O:xreadlines", &file))
return NULL;
ret = newreadlinesobject(file);
- Py_XINCREF(ret);
return (PyObject*)ret;
}