mirror of
https://github.com/python/cpython.git
synced 2024-11-28 04:15:11 +08:00
bpo-34457: Python/ast.c: Add missing NULL check to alias_for_import_name(). (GH-8852)
Reported by Svace static analyzer.
This commit is contained in:
parent
f8c06b0280
commit
28853a249b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user