Skip to content

Commit

Permalink
pythongh-118519: Fix empty weakref list check (python#118520)
Browse files Browse the repository at this point in the history
Fix empty list check
  • Loading branch information
DinoV authored May 2, 2024
1 parent 1e67b92 commit e54b0c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Objects/weakrefobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -988,7 +988,7 @@ PyObject_ClearWeakRefs(PyObject *object)
}

list = GET_WEAKREFS_LISTPTR(object);
if (FT_ATOMIC_LOAD_PTR(list) == NULL) {
if (FT_ATOMIC_LOAD_PTR(*list) == NULL) {
// Fast path for the common case
return;
}
Expand Down

0 comments on commit e54b0c8

Please sign in to comment.