Commit 75c74c59 authored by Barry Warsaw's avatar Barry Warsaw

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.
parent c5b5dd09
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment