diff options
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r-- | Objects/unicodeobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 5659c71ce8..30a925c341 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -12941,9 +12941,9 @@ unicode_endswith(PyObject *self, return NULL; } result = tailmatch(self, substring, start, end, +1); + Py_DECREF(substring); if (result == -1) return NULL; - Py_DECREF(substring); return PyBool_FromLong(result); } |