From: Neal Norwitz Date: Tue, 15 Nov 2005 07:17:53 +0000 (+0000) Subject: Fix another memory leak or two (one real, one potential) X-Git-Tag: v2.5a0~1159 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6b347890462d07ee87593d5619d84c67d4729232;p=python Fix another memory leak or two (one real, one potential) --- diff --git a/Python/ast.c b/Python/ast.c index 428b0cd82b..e5df90627a 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -1588,6 +1588,7 @@ ast_for_power(struct compiling *c, const node *n) } tmp = BinOp(e, Pow, f, LINENO(n)); if (!tmp) { + free_expr(f); free_expr(e); return NULL; } @@ -2112,11 +2113,11 @@ ast_for_exprlist(struct compiling *c, const node *n, int context) 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;