bpo-34457: Python/ast.c: Add missing NULL check to alias_for_import_name(). (GH-8852)
Reported by Svace static analyzer.
(cherry picked from commit 28853a249b
)
Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
This commit is contained in:
parent
3152bc36fd
commit
b8e7319d39
|
@ -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