From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sun, 26 Feb 2023 23:09:43 +0000 (-0800) Subject: gh-101765: unicodeobject: use Py_XDECREF correctly (GH-102283) X-Git-Tag: v3.10.11~69 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4cc363611caa1b91e1c97800c5e18f4dd5966bdd;p=thirdparty%2FPython%2Fcpython.git gh-101765: unicodeobject: use Py_XDECREF correctly (GH-102283) (cherry picked from commit 8d0f09b1beafd95763a5da53acc58dac0bd63a53) Co-authored-by: Jelle Zijlstra --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 16225ed8ac34..156c29bf212e 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -16081,7 +16081,7 @@ unicodeiter_reduce(unicodeiterobject *it, PyObject *Py_UNUSED(ignored)) } else { PyObject *u = (PyObject *)_PyUnicode_New(0); if (u == NULL) { - Py_DECREF(iter); + Py_XDECREF(iter); return NULL; } return Py_BuildValue("N(N)", iter, u);