From 23d0102ae8ab3262386f257e79683d9bd04f3db4 Mon Sep 17 00:00:00 2001 From: blurrycat <123909576+blurrycat@users.noreply.github.com> Date: Thu, 6 Mar 2025 19:59:51 +0100 Subject: [PATCH] Fix memory leak in CLI --- cli/util.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cli/util.zig b/cli/util.zig index 1cba0f1..df17534 100644 --- a/cli/util.zig +++ b/cli/util.zig @@ -222,7 +222,9 @@ pub fn runCommandInDir(allocator: std.mem.Allocator, argv: []const []const u8, d } return error.JetzigCommandError; } else { - printSuccess(try std.mem.join(allocator, " ", argv)); + const message = try std.mem.join(allocator, " ", argv); + defer allocator.free(message); + printSuccess(message); } }