mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00: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
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue