From: Neal Norwitz Date: Tue, 1 Apr 2008 08:08:09 +0000 (+0000) Subject: Fix refleak with nested classes. Fix originally by Amaury in r62015. X-Git-Tag: v3.0a4~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=36e6310e39c23a8082e270a809e3f0851910eec5;p=thirdparty%2FPython%2Fcpython.git Fix refleak with nested classes. Fix originally by Amaury in r62015. --- diff --git a/Python/compile.c b/Python/compile.c index 9ce8ac334ffc..94a271544319 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -1551,6 +1551,7 @@ compiler_class(struct compiler *c, stmt_ty s) { /* use the class name for name mangling */ Py_INCREF(s->v.ClassDef.name); + Py_XDECREF(c->u->u_private); c->u->u_private = s->v.ClassDef.name; /* force it to have one mandatory argument */ c->u->u_argcount = 1;