mirror of https://github.com/python/cpython
PyLong_FromString(): Nailed a small memory leak. In the str==start
test, we forgot that z is still pointing to a real live object. DECREF() it before returning.
This commit is contained in:
parent
aa2aea0e79
commit
b5cebfe164
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue