Commit 8e1ddbd5 authored by Xiang Zhang's avatar Xiang Zhang Committed by GitHub

fix a refleak in slot_sq_length (#1162)

parent 55fe1ae9
......@@ -5931,6 +5931,7 @@ slot_sq_length(PyObject *self)
assert(PyLong_Check(res));
if (Py_SIZE(res) < 0) {
Py_DECREF(res);
PyErr_SetString(PyExc_ValueError,
"__len__() should return >= 0");
return -1;
......
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