Commit d54ba76e40

Lee Cannon <leecannon@leecannon.xyz>
2021-12-16 23:19:43
TracyAllocator: correct order of free and alloc
1 parent 1fa5a19
Changed files (1)
src/tracy.zig
@@ -145,8 +145,8 @@ pub fn TracyAllocator(comptime name: ?[:0]const u8) type {
                     freeNamed(buf.ptr, n);
                     allocNamed(buf.ptr, resized_len, n);
                 } else {
-                    alloc(buf.ptr, resized_len);
                     free(buf.ptr);
+                    alloc(buf.ptr, resized_len);
                 }
 
                 return resized_len;