From 08c78ff48d4405cc9ea44db350f0de5b6796132f Mon Sep 17 00:00:00 2001 From: IntegratedQuantum Date: Fri, 25 Jul 2025 17:28:59 +0200 Subject: [PATCH] Fix double free detection of the StackAllocator --- src/utils/heap.zig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/utils/heap.zig b/src/utils/heap.zig index 2aa17767..f5abb954 100644 --- a/src/utils/heap.zig +++ b/src/utils/heap.zig @@ -122,9 +122,8 @@ pub const StackAllocator = struct { // MARK: StackAllocator previousTrailer = self.getTrailerBefore(previousTrailer.previousAllocationTrailer); } } - } else { - trailer.wasFreed = true; } + trailer.wasFreed = true; } else { self.backingAllocator.rawFree(memory, alignment, ret_addr); }