http://hg.python.org/cpython/rev/b4ccf8e1fdba changeset: 71890:b4ccf8e1fdba branch: 2.7 parent: 71882:80ac94ad381e user: Benjamin Peterson <benjamin at python.org> date: Tue Aug 16 22:26:48 2011 -0500 summary: fix possible refleaks files: Objects/typeobject.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/Objects/typeobject.c b/Objects/typeobject.c --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -2235,8 +2235,10 @@ (add_weak && strcmp(s, "__weakref__") == 0)) continue; tmp =_Py_Mangle(name, tmp); - if (!tmp) + if (!tmp) { + Py_DECREF(newslots); goto bad_slots; + } PyList_SET_ITEM(newslots, j, tmp); j++; } -- Repository URL: http://hg.python.org/cpython