diff options
Diffstat (limited to 'Objects/object.c')
| -rw-r--r-- | Objects/object.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Objects/object.c b/Objects/object.c index 05241e8a74..069afc0ac9 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -161,11 +161,12 @@ PyObject_InitVar(PyVarObject *op, PyTypeObject *tp, Py_ssize_t size) PyObject * _PyObject_New(PyTypeObject *tp) { - PyObject *op; - op = (PyObject *) PyObject_MALLOC(_PyObject_SIZE(tp)); - if (op == NULL) + PyObject *op = (PyObject *) PyObject_MALLOC(_PyObject_SIZE(tp)); + if (op == NULL) { return PyErr_NoMemory(); - return PyObject_INIT(op, tp); + } + PyObject_INIT(op, tp); + return op; } PyVarObject * |
