Issue #20437: Fixed 21 potential bugs when deleting objects references.
diff --git a/Objects/frameobject.c b/Objects/frameobject.c
index 808e595..b312130 100644
--- a/Objects/frameobject.c
+++ b/Objects/frameobject.c
@@ -952,8 +952,7 @@
 PyFrame_Fini(void)
 {
     (void)PyFrame_ClearFreeList();
-    Py_XDECREF(builtin_object);
-    builtin_object = NULL;
+    Py_CLEAR(builtin_object);
 }
 
 /* Print summary info about the state of the optimized allocator */