diff options
author | Guido van Rossum <guido@python.org> | 2001-03-23 18:30:19 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-03-23 18:30:19 (GMT) |
commit | 9dee48f6e7f080626d06ea8847834a7506935c97 (patch) | |
tree | 293df7e0f61af8aedb3e64f3350156798158a084 | |
parent | 559f6680c27f346c89e6dd29ba3235f7719ea6a7 (diff) | |
download | cpython-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().
-rw-r--r-- | Modules/xreadlinesmodule.c | 1 |
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; } |