From: Dino Viehland Date: Thu, 2 May 2024 20:03:29 +0000 (-0700) Subject: gh-118519: Fix empty weakref list check (#118520) X-Git-Tag: v3.13.0b1~147 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e54b0c8a4ad6c6e958245eb3ea4ecc47e0f97ff0;p=thirdparty%2FPython%2Fcpython.git gh-118519: Fix empty weakref list check (#118520) Fix empty list check --- diff --git a/Objects/weakrefobject.c b/Objects/weakrefobject.c index 93c5fe3aacec..88afaec86827 100644 --- a/Objects/weakrefobject.c +++ b/Objects/weakrefobject.c @@ -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; }