From: Guido van Rossum Date: Fri, 23 Mar 2001 18:30:19 +0000 (+0000) Subject: Fix a memory leak -- there's no need to INCREF() the result of X-Git-Tag: v2.1b2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9dee48f6e7f080626d06ea8847834a7506935c97;p=thirdparty%2FPython%2Fcpython.git Fix a memory leak -- there's no need to INCREF() the result of newreadlinesobject() in xreadlines(). --- diff --git a/Modules/xreadlinesmodule.c b/Modules/xreadlinesmodule.c index 4cdef8a7289e..db9e243a3ec8 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; }