Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Objects/dictobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -3254,7 +3254,7 @@ dict_dealloc(PyObject *self)
Py_TRASHCAN_BEGIN(mp, dict_dealloc)
if (values != NULL) {
if (values->embedded == 0) {
for (i = 0, n = mp->ma_keys->dk_nentries; i < n; i++) {
for (i = 0, n = FT_ATOMIC_LOAD_SSIZE_RELAXED(mp->ma_keys->dk_nentries); i < n; i++) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could also do n = values->capacity, which seems a bit cleaner to me because values->capacity never changes.

Py_XDECREF(values->values[i]);
}
free_values(values, false);
Expand Down
Loading