1
0
mirror of https://github.com/golang/go synced 2024-11-05 16:16:11 -07:00

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>
This commit is contained in:
Yasuhiro Matsumoto 2016-10-06 02:19:01 +09:00 committed by Brad Fitzpatrick
parent 6dd38ebae1
commit 56b746974c

View File

@ -80,6 +80,7 @@ func main() {
} else { } else {
log.Print("assembly failed") log.Print("assembly failed")
} }
out.Close()
os.Remove(*flags.OutputFile) os.Remove(*flags.OutputFile)
os.Exit(1) os.Exit(1)
} }