From 055b856f13ce527a92b2b28760daabce41edd440 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 9 Oct 2017 14:26:51 -0400 Subject: [PATCH] fix build on non-windows broken by previous commit --- std/os/child_process.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/std/os/child_process.zig b/std/os/child_process.zig index f88b9d407..679b79c01 100644 --- a/std/os/child_process.zig +++ b/std/os/child_process.zig @@ -178,9 +178,9 @@ pub const ChildProcess = struct { } fn cleanupStreams(self: &ChildProcess) { - if (self.stdin) |stdin| { stdin.close(); self.allocator.free(stdin); self.stdin = null; } - if (self.stdout) |stdout| { stdout.close(); self.allocator.free(stdout); self.stdout = null; } - if (self.stderr) |stderr| { stderr.close(); self.allocator.free(stderr); self.stderr = null; } + if (self.stdin) |stdin| { stdin.close(); self.allocator.destroy(stdin); self.stdin = null; } + if (self.stdout) |stdout| { stdout.close(); self.allocator.destroy(stdout); self.stdout = null; } + if (self.stderr) |stderr| { stderr.close(); self.allocator.destroy(stderr); self.stderr = null; } } fn cleanupAfterWait(self: &ChildProcess, status: i32) -> %Term {