summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/symtable.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/symtable.c b/Python/symtable.c
index 56e187a..6318324 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -27,8 +27,9 @@ PySTEntry_New(struct symtable *st, identifier name, _Py_block_ty block,
k = PyLong_FromVoidPtr(key);
if (k == NULL)
goto fail;
- ste = (PySTEntryObject *)PyObject_New(PySTEntryObject,
- &PySTEntry_Type);
+ ste = PyObject_New(PySTEntryObject, &PySTEntry_Type);
+ if (ste == NULL)
+ goto fail;
ste->ste_table = st;
ste->ste_id = k;
ste->ste_tmpname = 0;