From: Yasuhiro Matsumoto Date: Wed, 5 Oct 2016 17:19:01 +0000 (+0900) Subject: cmd/asm: close file before remove X-Git-Tag: go1.8beta1~1017 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=56b746974cb8dcd44b09c3db384e8aeaae8a9d3e;p=gostls13.git cmd/asm: close file before remove Windows doesn't remove an open file. Fixes #17345 Change-Id: I283930c7d6eb3bc09ad208191afefe989804ce32 Reviewed-on: https://go-review.googlesource.com/30430 Run-TryBot: Brad Fitzpatrick Reviewed-by: Brad Fitzpatrick --- diff --git a/src/cmd/asm/main.go b/src/cmd/asm/main.go index 92428fc811..13e5302301 100644 --- a/src/cmd/asm/main.go +++ b/src/cmd/asm/main.go @@ -80,6 +80,7 @@ func main() { } else { log.Print("assembly failed") } + out.Close() os.Remove(*flags.OutputFile) os.Exit(1) }