commit | ae13c88d8dcfef005556a176d39434da231fd8e1 | [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 | 377da01a67abfab15389e51e201df33f5a7dfa0e | |
parent | f6b25b9e357a6324118cb80cf84cd7f84d6fd5f7 [diff] |
fix possible refleaks
diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 97a94a7..856a4a5 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c
@@ -2093,8 +2093,10 @@ PyUnicode_CompareWithASCIIString(tmp, "__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++; }