]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/asm: close file before remove
authorYasuhiro Matsumoto <mattn.jp@gmail.com>
Wed, 5 Oct 2016 17:19:01 +0000 (02:19 +0900)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 5 Oct 2016 18:16:52 +0000 (18:16 +0000)
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>
src/cmd/asm/main.go

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