Commit 6b18a5bb authored by Guido van Rossum's avatar Guido van Rossum

Fix refcounting bug reported by Amaury Forgeot d'Arc.

parent 42dae6a8
......@@ -2311,6 +2311,7 @@ object_richcompare(PyObject *self, PyObject *other, int op)
case Py_EQ:
res = (self == other) ? Py_True : Py_False;
Py_INCREF(res);
break;
case Py_NE:
......@@ -2334,10 +2335,10 @@ object_richcompare(PyObject *self, PyObject *other, int op)
default:
res = Py_NotImplemented;
Py_INCREF(res);
break;
}
Py_INCREF(res);
return res;
}
......
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