Skip to content

Commit ac503e8

Browse files
committed
Fix missing decref when storing and dict is detached but has been deleted
1 parent 8433d25 commit ac503e8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Objects/dictobject.c

+3
Original file line numberDiff line numberDiff line change
@@ -6805,6 +6805,9 @@ _PyObject_StoreInstanceAttribute(PyObject *obj, PyObject *name, PyObject *value)
68056805
if (dict == NULL) {
68066806
return -1;
68076807
}
6808+
int res = store_instance_attr_dict(obj, dict, name, value);
6809+
Py_DECREF(dict);
6810+
return res;
68086811
}
68096812
return store_instance_attr_dict(obj, dict, name, value);
68106813
}

0 commit comments

Comments
 (0)