We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b4df92 commit 06a01ebCopy full SHA for 06a01eb
1 file changed
Objects/dictobject.c
@@ -6632,17 +6632,18 @@ dictitems_xor_lock_held(PyObject *d1, PyObject *d2)
6632
else {
6633
Py_INCREF(val1);
6634
to_delete = PyObject_RichCompareBool(val1, val2, Py_EQ);
6635
+ Py_CLEAR(val1);
6636
if (to_delete < 0) {
6637
goto error;
6638
}
6639
6640
6641
if (to_delete) {
6642
+ Py_CLEAR(val2);
6643
if (_PyDict_DelItem_KnownHash(temp_dict, key, hash) < 0) {
6644
6645
6646
Py_CLEAR(key);
- Py_CLEAR(val2);
6647
6648
6649
PyObject *pair = _PyTuple_FromPairSteal(key, val2);
@@ -6656,7 +6657,6 @@ dictitems_xor_lock_held(PyObject *d1, PyObject *d2)
6656
6657
6658
Py_DECREF(pair);
6659
- Py_CLEAR(val1);
6660
6661
6662
PyObject *remaining_pairs = PyObject_CallMethodNoArgs(
0 commit comments