main: exit 1 on memory leak detection

This commit is contained in:
Pierre Tachoire committed 2025-03-31 12:35:33 +02:00
1 parent fbe8086c98
commit cf015b2ce7
1 file changed
+1 -1
+1 -1
View File
@@ -52,7 +52,7 @@ pub fn main() !void {
const alloc = if (builtin.mode == .Debug) gpa.allocator() else std.heap.c_allocator;
defer if (builtin.mode == .Debug) {
_ = gpa.detectLeaks();
if (gpa.detectLeaks()) std.posix.exit(1);
};
var args_arena = std.heap.ArenaAllocator.init(alloc);