mirror of
https://github.com/python/cpython.git
synced 2026-05-19 02:44:16 -04:00
Handle memory allocation failure. Found by Adam Olsen
This commit is contained in:
+3
-2
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user