This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author christian.heimes
Recipients christian.heimes
Date 2013-07-01.23:11:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1372720264.13.0.315058042183.issue18344@psf.upfronthosting.co.za>
In-reply-to
Content
Modules/_io/bufferedio.c:_bufferedreader_read_all() doesn't call Py_XDECREF(data) multiple times and may leak a reference in an error case. For example the ref leak occurs when current_size > 0 and PyObject_CallMethodObjArgs(self->raw, _PyIO_str_readall, NULL) fails orbuffered_flush_and_rewind_unlocked(self) fails.

There are a few more places where data isn't decrefed on return, too.

CID 715364 (#2 of 2): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable "data" going out of scope leaks the storage it points to.
History
Date User Action Args
2013-07-01 23:11:04christian.heimessetrecipients: + christian.heimes
2013-07-01 23:11:04christian.heimessetmessageid: <1372720264.13.0.315058042183.issue18344@psf.upfronthosting.co.za>
2013-07-01 23:11:04christian.heimeslinkissue18344 messages
2013-07-01 23:11:04christian.heimescreate