From 32cda5d56a02da260509dd0cc0c7e4eac2cd2e46 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 2 Jun 2021 22:12:38 +0100 Subject: [PATCH] Or did it?! --- core/path/filepath/path.odin | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/path/filepath/path.odin b/core/path/filepath/path.odin index 6a3c5f7a2..96f7cb7d0 100644 --- a/core/path/filepath/path.odin +++ b/core/path/filepath/path.odin @@ -170,8 +170,8 @@ clean :: proc(path: string, allocator := context.allocator) -> string { cleaned, new_allocation := from_slash(s); if new_allocation { delete(s); + lazy_buffer_destroy(out); } - lazy_buffer_destroy(out); return cleaned; } @@ -397,8 +397,8 @@ lazy_buffer_string :: proc(lb: ^Lazy_Buffer) -> string { return string(z); } @(private) - delete(lb.b); lazy_buffer_destroy :: proc(lb: ^Lazy_Buffer) { + delete(lb.b); free(lb); lb^ = {}; }