mirror of
https://github.com/python/cpython.git
synced 2025-11-03 11:23:31 +00:00
Fix a memory leak -- there's no need to INCREF() the result of
newreadlinesobject() in xreadlines().
This commit is contained in:
parent
559f6680c2
commit
9dee48f6e7
1 changed files with 0 additions and 1 deletions
|
|
@ -50,7 +50,6 @@ xreadlines(PyObject *self, PyObject *args)
|
||||||
if (!PyArg_ParseTuple(args, "O:xreadlines", &file))
|
if (!PyArg_ParseTuple(args, "O:xreadlines", &file))
|
||||||
return NULL;
|
return NULL;
|
||||||
ret = newreadlinesobject(file);
|
ret = newreadlinesobject(file);
|
||||||
Py_XINCREF(ret);
|
|
||||||
return (PyObject*)ret;
|
return (PyObject*)ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue