From 36e6310e39c23a8082e270a809e3f0851910eec5 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Tue, 1 Apr 2008 08:08:09 +0000 Subject: Fix refleak with nested classes. Fix originally by Amaury in r62015. --- Python/compile.c | 1 + 1 file changed, 1 insertion(+) (limited to 'Python/compile.c') diff --git a/Python/compile.c b/Python/compile.c index 9ce8ac334f..94a2715443 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; -- cgit v1.2.1