# Author: Florin Papa diff -r 29cc6b2f9d28 Objects/typeobject.c --- a/Objects/typeobject.c Wed Dec 30 21:39:21 2015 +0200 +++ b/Objects/typeobject.c Thu Dec 31 10:34:24 2015 +0200 @@ -2482,6 +2482,15 @@ fixup_slot_dispatchers(type); return (PyObject *)type; + + error: + Py_XDECREF(type); + Py_XDECREF(name); + Py_XDECREF(slots); + Py_XDECREF(newslots); + Py_XDECREF(bases); + Py_XDECREF(base); + return NULL; } /* Internal API to look for a name through the MRO.