summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Objects/typeobject.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 74a00b1..e790c04 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -4852,6 +4852,7 @@ slot_tp_hash(PyObject *self)
Py_DECREF(res);
}
else {
+ Py_XDECREF(func); /* may be None */
PyErr_Clear();
func = lookup_method(self, "__eq__", &eq_str);
if (func == NULL) {