Skip to content

Commit 8433d25

Browse files
committed
Decref materialized dict on fail to set
1 parent 0023395 commit 8433d25

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Objects/dictobject.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6734,6 +6734,7 @@ store_instance_attr_lock_held(PyObject *obj, PyDictValues *values,
67346734
dict = make_dict_from_instance_attributes(PyInterpreterState_Get(), keys, values);
67356735
if (dict == NULL ||
67366736
set_or_del_lock_held(dict, name, value) < 0) {
6737+
Py_XDECREF(dict);
67376738
return -1;
67386739
}
67396740

0 commit comments

Comments
 (0)