[issue3660] reference leaks in 3.0
Amaury Forgeot d'Arc
report at bugs.python.org
Fri Sep 5 15:08:34 CEST 2008
Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:
Antoine, it seem that with encode-leak2.patch, the error path after
PyErr_WarnEx() leaks the value of "v".
I rewrote the whole paragraph to make it more straightforward:
- the normal case is tested first
- all paths end with a "return", and no goto.
- no need to test that PyBytes_FromStringAndSize returns a PyBytes...
I find the code much easier to check in this form, but of course this is
a subjective POV.
Added file: http://bugs.python.org/file11391/encode-leak3.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3660>
_______________________________________
More information about the Python-bugs-list
mailing list