commit | de66ecc75fc06abbee21100e760cc7a5542c0308 | [log] [tgz] |
---|---|---|
author | Benjamin Peterson <benjamin@python.org> | Tue Aug 16 22:26:48 2011 -0500 |
committer | Benjamin Peterson <benjamin@python.org> | Tue Aug 16 22:26:48 2011 -0500 |
tree | f018db3b9caabd962fcab723ff23a3610344eaf9 | |
parent | 4047d68a0565bb43d3d1b2f489e500f247d89b2b [diff] [blame] |
fix possible refleaks
diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 3864b48..7c98cfd 100644 --- 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++; }