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 flox
Recipients Trundle, amaury.forgeotdarc, brett.cannon, flox, r.david.murray
Date 2010-01-28.20:11:25
SpamBayes Score 2.3997573e-09
Marked as misclassified No
Message-id <1264709488.41.0.791846924469.issue7732@psf.upfronthosting.co.za>
In-reply-to
Content
> if PyFile_FromFile fails for another reason (PyString_FromString(name)
> runs out of memory), the fp is not closed and the caller is right to
> call fclose().

As far as I understand, the fp is never left open, when PyFile_FromFile returns NULL. So there's no reason to call fclose on it.

However I found a reference leak in the case you describe (PyString_FromString(name) == NULL).

It is fixed with this last update.
History
Date User Action Args
2010-01-28 20:11:28floxsetrecipients: + flox, brett.cannon, amaury.forgeotdarc, r.david.murray, Trundle
2010-01-28 20:11:28floxsetmessageid: <1264709488.41.0.791846924469.issue7732@psf.upfronthosting.co.za>
2010-01-28 20:11:26floxlinkissue7732 messages
2010-01-28 20:11:26floxcreate