build: fix memory leaks
This commit is contained in:
parent
4d7cd69ebe
commit
f556550501
1 changed files with 1 additions and 0 deletions
|
@ -142,6 +142,7 @@ fn addGLFWSources(b: *Builder, step: *std.build.LibExeObjStep, lib: *std.build.L
|
||||||
|
|
||||||
fn ensureDependencySubmodule(allocator: std.mem.Allocator, path: []const u8) !void {
|
fn ensureDependencySubmodule(allocator: std.mem.Allocator, path: []const u8) !void {
|
||||||
if (std.process.getEnvVarOwned(allocator, "NO_ENSURE_SUBMODULES")) |no_ensure_submodules| {
|
if (std.process.getEnvVarOwned(allocator, "NO_ENSURE_SUBMODULES")) |no_ensure_submodules| {
|
||||||
|
defer allocator.free(no_ensure_submodules);
|
||||||
if (std.mem.eql(u8, no_ensure_submodules, "true")) return;
|
if (std.mem.eql(u8, no_ensure_submodules, "true")) return;
|
||||||
} else |_| {}
|
} else |_| {}
|
||||||
var child = std.ChildProcess.init(&.{ "git", "submodule", "update", "--init", path }, allocator);
|
var child = std.ChildProcess.init(&.{ "git", "submodule", "update", "--init", path }, allocator);
|
||||||
|
|
Loading…
Add table
Reference in a new issue