summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-02-26 23:09:43 (GMT)
committerGitHub <noreply@github.com>2023-02-26 23:09:43 (GMT)
commit4cc363611caa1b91e1c97800c5e18f4dd5966bdd (patch)
treebee0e70f6c4c53753f80d751428aba819b960f6d /Objects
parent8e9ffd956aaec3aa82bb91a4fa0dd390209013f2 (diff)
downloadcpython-4cc363611caa1b91e1c97800c5e18f4dd5966bdd.zip
cpython-4cc363611caa1b91e1c97800c5e18f4dd5966bdd.tar.gz
cpython-4cc363611caa1b91e1c97800c5e18f4dd5966bdd.tar.bz2
gh-101765: unicodeobject: use Py_XDECREF correctly (GH-102283)
(cherry picked from commit 8d0f09b1beafd95763a5da53acc58dac0bd63a53) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 16225ed..156c29b 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);