Fix a memory leak -- there's no need to INCREF() the result of
authorGuido van Rossum <guido@python.org>
Fri, 23 Mar 2001 18:30:19 +0000 (18:30 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 23 Mar 2001 18:30:19 +0000 (18:30 +0000)
newreadlinesobject() in xreadlines().

Modules/xreadlinesmodule.c

index 4cdef8a7289e4a8d2e9c002f24f1bba83120323c..db9e243a3ec84f177afea6d23dc2b73938d50ac8 100644 (file)
@@ -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;
 }