From: Neal Norwitz Date: Thu, 2 Mar 2006 08:08:42 +0000 (+0000) Subject: Fix refleak if from __future__ import was not first X-Git-Tag: v2.5a0~400 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d9cf85f421e569d594c7444849c8004aa0e5dc85;p=thirdparty%2FPython%2Fcpython.git Fix refleak if from __future__ import was not first --- diff --git a/Python/compile.c b/Python/compile.c index 45fc3698492f..7abc11777dc8 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -2529,6 +2529,7 @@ compiler_from_import(struct compiler *c, stmt_ty s) if (s->lineno > c->c_future->ff_lineno) { if (!strcmp(PyString_AS_STRING(s->v.ImportFrom.module), "__future__")) { + Py_DECREF(level); Py_DECREF(names); return compiler_error(c, "from __future__ imports must occur "