From: Benjamin Peterson Date: Mon, 16 Jan 2012 22:31:43 +0000 (-0500) Subject: only finish error if one occurred X-Git-Tag: v3.3.0a1~372 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=205ad61313eef001d1e6d8afe338242dd1fac984;p=thirdparty%2FPython%2Fcpython.git only finish error if one occurred --- diff --git a/Python/ast.c b/Python/ast.c index 66b85b5a7f53..ef161b6f258b 100644 --- a/Python/ast.c +++ b/Python/ast.c @@ -835,7 +835,8 @@ PyAST_FromNode(const node *n, PyCompilerFlags *flags, const char *filename, PyTuple_SET_ITEM(c.c_normalize_args, 1, NULL); Py_DECREF(c.c_normalize_args); } - ast_error_finish(filename); + if (!res) + ast_error_finish(filename); return res; }