1. Armin Rigo
  2. cpython-withatomic

Commits

Neal Norwitz  committed 5a17d15

Fix refleak with nested classes. Fix originally by Amaury in r62015.

  • Participants
  • Parent commits 30dd606
  • Branches default

Comments (0)

Files changed (1)

File Python/compile.c

View file
  • Ignore whitespace
 	{
 		/* 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;