fix(macos): fix memory leak
This commit is contained in:
@@ -12,6 +12,7 @@ pub fn getShell(allocator: std.mem.Allocator) ![]u8 {
|
|||||||
const shell = try std.process.getEnvVarOwned(allocator, "SHELL");
|
const shell = try std.process.getEnvVarOwned(allocator, "SHELL");
|
||||||
|
|
||||||
var child = std.process.Child.init(&[_][]const u8{ shell, "--version" }, allocator);
|
var child = std.process.Child.init(&[_][]const u8{ shell, "--version" }, allocator);
|
||||||
|
defer allocator.free(shell);
|
||||||
|
|
||||||
child.stdout_behavior = .Pipe;
|
child.stdout_behavior = .Pipe;
|
||||||
child.stderr_behavior = .Pipe;
|
child.stderr_behavior = .Pipe;
|
||||||
|
|||||||
Reference in New Issue
Block a user