Skip to content

Commit 0b03537

Browse files
Apply suggestions from code review
Co-authored-by: Victor Stinner <vstinner@python.org>
1 parent 5db1922 commit 0b03537

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Objects/dictobject.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6641,8 +6641,8 @@ dictitems_xor_lock_held(PyObject *d1, PyObject *d2)
66416641
if (_PyDict_DelItem_KnownHash(temp_dict, key, hash) < 0) {
66426642
goto error;
66436643
}
6644-
Py_DECREF(key);
6645-
Py_DECREF(val2);
6644+
Py_CLEAR(key);
6645+
Py_CLEAR(val2);
66466646
}
66476647
else {
66486648
PyObject *pair = _PyTuple_FromPairSteal(key, val2);
@@ -6656,7 +6656,7 @@ dictitems_xor_lock_held(PyObject *d1, PyObject *d2)
66566656
}
66576657
Py_DECREF(pair);
66586658
}
6659-
Py_XDECREF(val1);
6659+
Py_CLEAR(val1);
66606660
}
66616661
key = val1 = val2 = NULL;
66626662

0 commit comments

Comments
 (0)