diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2012-10-02 10:54:07 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2012-10-02 10:54:07 (GMT) |
commit | c89d28fdfc3654daf1d112e76d3b6cca80c5bb00 (patch) | |
tree | 76379956b0322cb2c3aa33dbd642a73383849f59 /Objects/unicodeobject.c | |
parent | 450dbcf4219acf231f60886a924a1e28dfb8ceef (diff) | |
download | cpython-c89d28fdfc3654daf1d112e76d3b6cca80c5bb00.zip cpython-c89d28fdfc3654daf1d112e76d3b6cca80c5bb00.tar.gz cpython-c89d28fdfc3654daf1d112e76d3b6cca80c5bb00.tar.bz2 |
Issue #15609: Fix refleak introduced by my last optimization
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r-- | Objects/unicodeobject.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 @@ 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; } |