diff --git a/Objects/longobject.c b/Objects/longobject.c index 834b8a87521..7c805a5259f 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -769,6 +769,7 @@ PyLong_FromString(str, pend, base) if (str == start) { PyErr_SetString(PyExc_ValueError, "no digits in long int constant"); + Py_DECREF(z); return NULL; } if (sign < 0 && z != NULL && z->ob_size != 0)