Fix refleak introduced in r59576.
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 @@
 		Py_DECREF(res);
 	}
 	else {
+		Py_XDECREF(func); /* may be None */
 		PyErr_Clear();
 		func = lookup_method(self, "__eq__", &eq_str);
 		if (func == NULL) {