Mercurial > cpython-lru_cache-weakref
diff Python/ast.c @ 35875:086caccfff0e legacy-trunk
Fix another memory leak or two (one real, one potential)
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Tue, 15 Nov 2005 07:17:53 +0000 |
| parents | 44d63eedfaca |
| children | 1f9d4ac35010 |
line wrap: on
line diff
--- a/Python/ast.c Tue Nov 15 05:09:44 2005 +0000 +++ b/Python/ast.c Tue Nov 15 07:17:53 2005 +0000 @@ -1588,6 +1588,7 @@ } tmp = BinOp(e, Pow, f, LINENO(n)); if (!tmp) { + free_expr(f); free_expr(e); return NULL; } @@ -2112,11 +2113,11 @@ e = ast_for_expr(c, CHILD(n, i)); if (!e) goto error; + asdl_seq_SET(seq, i / 2, e); if (context) { if (!set_context(e, context, CHILD(n, i))) goto error; } - asdl_seq_SET(seq, i / 2, e); } return seq;
