commit | c89d28fdfc3654daf1d112e76d3b6cca80c5bb00 | [log] [tgz] |
---|---|---|
author | Victor Stinner <victor.stinner@gmail.com> | Tue Oct 02 12:54:07 2012 +0200 |
committer | Victor Stinner <victor.stinner@gmail.com> | Tue Oct 02 12:54:07 2012 +0200 |
tree | 76379956b0322cb2c3aa33dbd642a73383849f59 | |
parent | 450dbcf4219acf231f60886a924a1e28dfb8ceef [diff] |
Issue #15609: Fix refleak introduced by my last optimization
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 606aa33..83f2a2a 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c
@@ -13449,8 +13449,11 @@ 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; }