Issue #15609: Fix refleak introduced by my last optimization

This commit is contained in:
Victor Stinner 2012-10-02 12:54:07 +02:00
parent 450dbcf421
commit c89d28fdfc
1 changed files with 4 additions and 1 deletions

View File

@ -13449,8 +13449,11 @@ mainformatlong(_PyUnicodeWriter *writer, PyObject *v,
break;
}
if (_PyLong_FormatWriter(writer, v, base, alternate) == -1)
if (_PyLong_FormatWriter(writer, v, base, alternate) == -1) {
Py_DECREF(iobj);
return -1;
}
Py_DECREF(iobj);
return 1;
}