fix(linux): fix memory leak

This commit is contained in:
utox39
2025-04-18 14:25:51 +02:00
parent dce7762a46
commit 931f474b83

View File

@@ -9,6 +9,7 @@ pub fn getShell(allocator: std.mem.Allocator) ![]u8 {
const shell = try std.process.getEnvVarOwned(allocator, "SHELL");
var child = std.process.Child.init(&[_][]const u8{ shell, "--version" }, allocator);
defer allocator.free(shell);
child.stdout_behavior = .Pipe;
child.stderr_behavior = .Pipe;