Mercurial > cpython-lru_cache-weakref
diff Python/compile.c @ 36804:c552f2275782 legacy-trunk
Fix refleak if from __future__ import was not first
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Thu, 02 Mar 2006 08:08:42 +0000 |
| parents | 7285c37d7633 |
| children | 07f330ad1b47 |
line wrap: on
line diff
--- a/Python/compile.c Thu Mar 02 07:54:28 2006 +0000 +++ b/Python/compile.c Thu Mar 02 08:08:42 2006 +0000 @@ -2529,6 +2529,7 @@ 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 "
