diff options
Diffstat (limited to 'Objects/intobject.c')
-rw-r--r-- | Objects/intobject.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/intobject.c b/Objects/intobject.c index 4b5dc55..a3df3ba 100644 --- a/Objects/intobject.c +++ b/Objects/intobject.c @@ -958,8 +958,10 @@ int_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds) } new = type->tp_alloc(type, 0); - if (new == NULL) + if (new == NULL) { + Py_DECREF(tmp); return NULL; + } ((PyIntObject *)new)->ob_ival = ival; Py_DECREF(tmp); return new; |