summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-03-02 08:08:42 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-03-02 08:08:42 (GMT)
commitd9cf85f421e569d594c7444849c8004aa0e5dc85 (patch)
treefb7c9c4c3fed930cd465b18ab238104465e07ecd /Python
parent814e938d0845d71727e1ad2c1113657bfc9f8c77 (diff)
downloadcpython-d9cf85f421e569d594c7444849c8004aa0e5dc85.zip
cpython-d9cf85f421e569d594c7444849c8004aa0e5dc85.tar.gz
cpython-d9cf85f421e569d594c7444849c8004aa0e5dc85.tar.bz2
Fix refleak if from __future__ import was not first
Diffstat (limited to 'Python')
-rw-r--r--Python/compile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 45fc369..7abc117 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 "