From 1820b6ceffadd466ea1f0e7373576cff93ed7704 Mon Sep 17 00:00:00 2001 From: AZero13 Date: Wed, 10 Dec 2025 12:24:35 -0500 Subject: [PATCH] __CFSetLastAllocationEventName should be the list, not the tree callbacks --- Sources/CoreFoundation/CFTree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/CoreFoundation/CFTree.c b/Sources/CoreFoundation/CFTree.c index a132b8b2c9..e2ab12becb 100644 --- a/Sources/CoreFoundation/CFTree.c +++ b/Sources/CoreFoundation/CFTree.c @@ -411,7 +411,7 @@ void CFTreeSortChildren(CFTreeRef tree, CFComparatorFunction comparator, void *c CFTreeRef *list, buffer[128]; list = (children < 128) ? buffer : (CFTreeRef *)CFAllocatorAllocate(kCFAllocatorSystemDefault, children * sizeof(CFTreeRef), 0); // XXX_PCB GC OK - if (__CFOASafe && list != buffer) __CFSetLastAllocationEventName(tree->_callbacks, "CFTree (temp)"); + if (__CFOASafe && list != buffer) __CFSetLastAllocationEventName(list, "CFTree (temp)"); nextChild = tree->_child; for (idx = 0; NULL != nextChild; idx++) { list[idx] = nextChild;