diff options
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c index 5f26da8..558df3f 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -1736,8 +1736,12 @@ compiler_enter_scope(struct compiler *c, identifier name, Py_INCREF(name); u->u_name = name; u->u_varnames = list2dict(u->u_ste->ste_varnames); + if (!u->u_varnames) { + compiler_unit_free(u); + return 0; + } u->u_cellvars = dictbytype(u->u_ste->ste_symbols, CELL, 0, 0); - if (!u->u_varnames || !u->u_cellvars) { + if (!u->u_cellvars) { compiler_unit_free(u); return 0; } |