SF bug 681122: Built-in function dir() causes refcount leak in baseclasses.

merge_class_dict():  This was missing a decref.

Bugfix candidate.
This commit is contained in:
Tim Peters 2003-02-05 19:35:19 +00:00
parent 6ee0480521
commit 18e7083cda

View File

@ -1656,12 +1656,15 @@ merge_class_dict(PyObject* dict, PyObject* aclass)
PyErr_Clear();
else {
for (i = 0; i < n; i++) {
int status;
PyObject *base = PySequence_GetItem(bases, i);
if (base == NULL) {
Py_DECREF(bases);
return -1;
}
if (merge_class_dict(dict, base) < 0) {
status = merge_class_dict(dict, base);
Py_DECREF(base);
if (status < 0) {
Py_DECREF(bases);
return -1;
}