diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 710033639ff..013fe4a66af 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -2928,6 +2928,7 @@ PyObject *PyUnicode_DecodeCharmap(const char *s, Py_DECREF(x); goto onError; } + Py_DECREF(x); continue; } else if (PyUnicode_Check(x)) {