Kaydet (Commit) a9e14b70 authored tarafından Raymond Hettinger's avatar Raymond Hettinger

Fix leak in classobject.c. The leak surfaced on the error exit when

hashing a class that does not define __hash__ but does define a
comparison.
üst 2d72b5d7
......@@ -953,6 +953,7 @@ instance_hash(PyInstanceObject *inst)
return _Py_HashPointer(inst);
}
}
Py_XDECREF(func);
PyErr_SetString(PyExc_TypeError, "unhashable instance");
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