Skip to content

Commit df39dc2

Browse files
author
neal.norwitz
committed
Fix refleak with nested classes. Fix originally by Amaury in r62015.
git-svn-id: http://svn.python.org/projects/python/branches/py3k@62089 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent a7ce21e commit df39dc2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Python/compile.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1551,6 +1551,7 @@ compiler_class(struct compiler *c, stmt_ty s)
15511551
{
15521552
/* use the class name for name mangling */
15531553
Py_INCREF(s->v.ClassDef.name);
1554+
Py_XDECREF(c->u->u_private);
15541555
c->u->u_private = s->v.ClassDef.name;
15551556
/* force it to have one mandatory argument */
15561557
c->u->u_argcount = 1;

0 commit comments

Comments
 (0)