GH-127705: Don't call _Py_ForgetReference before _Py_Dealloc (GH-131508)

This commit is contained in:
Mark Shannon 2025-03-20 15:45:43 +00:00 committed by GitHub
parent 7ebd71ee14
commit 684a759c20
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -445,9 +445,6 @@ static inline void Py_DECREF_MORTAL(const char *filename, int lineno, PyObject *
_Py_DECREF_DecRefTotal();
}
if (--op->ob_refcnt == 0) {
#ifdef Py_TRACE_REFS
_Py_ForgetReference(op);
#endif
_Py_Dealloc(op);
}
}