From: Jelle Zijlstra Date: Sun, 26 Feb 2023 22:45:37 +0000 (-0800) Subject: gh-101765: unicodeobject: use Py_XDECREF correctly (#102283) X-Git-Tag: v3.12.0a6~65 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8d0f09b1beafd95763a5da53acc58dac0bd63a53;p=thirdparty%2FPython%2Fcpython.git gh-101765: unicodeobject: use Py_XDECREF correctly (#102283) --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 2f4c3d3793ef..1ba30421c66d 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -14795,7 +14795,7 @@ unicodeiter_reduce(unicodeiterobject *it, PyObject *Py_UNUSED(ignored)) } else { PyObject *u = unicode_new_empty(); if (u == NULL) { - Py_DECREF(iter); + Py_XDECREF(iter); return NULL; } return Py_BuildValue("N(N)", iter, u);