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.
PyTuple_New
dictiter_iternextitem
1 parent 6ecf77d commit ded59f7Copy full SHA for ded59f7
Objects/dictobject.c
@@ -5719,8 +5719,11 @@ dictiter_iternextitem(PyObject *self)
5719
}
5720
else {
5721
result = PyTuple_New(2);
5722
- if (result == NULL)
+ if (result == NULL) {
5723
+ Py_DECREF(key);
5724
+ Py_DECREF(value);
5725
return NULL;
5726
+ }
5727
PyTuple_SET_ITEM(result, 0, key);
5728
PyTuple_SET_ITEM(result, 1, value);
5729
0 commit comments