Florent Xicluna <la...@yahoo.fr> added the comment:

> 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.

----------
Added file: http://bugs.python.org/file16029/issue7732_find_module_v2.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7732>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to