diff options
| author | Benjamin Peterson <benjamin@python.org> | 2011-08-16 22:27:42 -0500 |
|---|---|---|
| committer | Benjamin Peterson <benjamin@python.org> | 2011-08-16 22:27:42 -0500 |
| commit | 3e6267e7046b8d1473b2fd1c66dad9c4b8a81ae3 (patch) | |
| tree | 1e1f03512d188cbdbfa0c16fd6e7b2d079a14403 /Objects/typeobject.c | |
| parent | c4085c847065464de0255c806314e136cd260bdb (diff) | |
| parent | ae13c88d8dcfef005556a176d39434da231fd8e1 (diff) | |
| download | cpython-git-3e6267e7046b8d1473b2fd1c66dad9c4b8a81ae3.tar.gz | |
merge 3.2
Diffstat (limited to 'Objects/typeobject.c')
| -rw-r--r-- | Objects/typeobject.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 3c1d3a1681..3971062ead 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -2091,8 +2091,10 @@ type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds) 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); if (PyDict_GetItem(dict, tmp)) { PyErr_Format(PyExc_ValueError, |
