]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-101765: unicodeobject: use Py_XDECREF correctly (GH-102283)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 26 Feb 2023 23:09:18 +0000 (15:09 -0800)
committerGitHub <noreply@github.com>
Sun, 26 Feb 2023 23:09:18 +0000 (15:09 -0800)
(cherry picked from commit 8d0f09b1beafd95763a5da53acc58dac0bd63a53)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Objects/unicodeobject.c

index 9b8296ca6bb0540aea72608917d9672044406d16..84d17f000b41e4a58569f765368f740fa7483516 100644 (file)
@@ -15768,7 +15768,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);