diff --git a/Python/ast.c b/Python/ast.c index 3b4cd162fcce2f..a91c075dae6684 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -3252,6 +3252,8 @@ alias_for_import_name(struct compiling *c, const node *n, int store) break; case STAR: str = PyUnicode_InternFromString("*"); + if (!str) + return NULL; if (PyArena_AddPyObject(c->c_arena, str) < 0) { Py_DECREF(str); return NULL;