aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYasuhiro Matsumoto <mattn.jp@gmail.com>2016-10-06 02:19:01 +0900
committerBrad Fitzpatrick <bradfitz@golang.org>2016-10-05 18:16:52 +0000
commit56b746974cb8dcd44b09c3db384e8aeaae8a9d3e (patch)
treed2fa36c5dd88849da79be94e9400528ceeff3aad /src
parent6dd38ebae11dc0dfa607723de3c12355e556c6ed (diff)
downloadgo-56b746974cb8dcd44b09c3db384e8aeaae8a9d3e.tar.xz
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 <bradfitz@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'src')
-rw-r--r--src/cmd/asm/main.go1
1 files changed, 1 insertions, 0 deletions
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)
}