From e6f9218035421738592b0776d56297c36f8fc35c Mon Sep 17 00:00:00 2001 From: Ryan Sanche Date: Sat, 11 Dec 2021 02:59:50 -0800 Subject: [PATCH] Fix temp file leak --- compiler/compiler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/compiler.go b/compiler/compiler.go index 2a747b8..9682a0f 100644 --- a/compiler/compiler.go +++ b/compiler/compiler.go @@ -121,7 +121,7 @@ func Compile(outname, dir string, patterns []string, assemble, run bool) int { } bintemp.Close() // customasm will write to it binfile = bintemp.Name() - // defer os.Remove(bintemp.Name()) + defer os.Remove(bintemp.Name()) root := goenv.Get("NANOGOROOT") path := filepath.Join(root, "arch", arch.Name(), "customasm")