]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-101765: unicodeobject: use Py_XDECREF correctly (#102283)
authorJelle Zijlstra <jelle.zijlstra@gmail.com>
Sun, 26 Feb 2023 22:45:37 +0000 (14:45 -0800)
committerGitHub <noreply@github.com>
Sun, 26 Feb 2023 22:45:37 +0000 (14:45 -0800)
Objects/unicodeobject.c

index 2f4c3d3793efd6f9e3db43f63803c081810949bf..1ba30421c66dba45652519b67300ad4d1e987574 100644 (file)
@@ -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);