Daniel Urban <urban.dani...@gmail.com> added the comment:

Isn't it possible, that in the issue5094b.diff patch, in the new_timezone_ex 
function, in this part:

self = (PyDateTime_TimeZone *)type->tp_alloc(type, 0);
if (self == NULL)
    return NULL;

should be a Py_DECREF(offset) call?

I mean like:

self = (PyDateTime_TimeZone *)type->tp_alloc(type, 0);
if (self == NULL) {
    Py_DECREF(offset);
    return NULL;
}

I think the refcount of offset has always been incremented, so in case of an 
error, it should be decremented (as in the other error handling parts of the 
function).

----------

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

Reply via email to