Commit d9cf85f4 authored by Neal Norwitz's avatar Neal Norwitz

Fix refleak if from __future__ import was not first

parent 814e938d
......@@ -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 "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment