gh-101765: unicodeobject: use Py_XDECREF correctly (GH-102283)

(cherry picked from commit 8d0f09b1be)

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This commit is contained in:
Miss Islington (bot) 2023-02-26 15:09:18 -08:00 committed by GitHub
parent eb5565918a
commit 64d3715de8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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);