]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/cgo: close file
authoralex-semenyuk <alexsemenyuk88@gmail.com>
Sun, 17 May 2020 16:05:05 +0000 (16:05 +0000)
committerIan Lance Taylor <iant@golang.org>
Tue, 18 Aug 2020 04:11:37 +0000 (04:11 +0000)
Change-Id: Ia70edc8ba22e31e498fe07946db41882804bd39f
GitHub-Last-Rev: 280232e879965b34fae3aa02e6215eff5bd7be46
GitHub-Pull-Request: golang/go#39120
Reviewed-on: https://go-review.googlesource.com/c/go/+/234317
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/cgo/out.go

index 4064f0ae41819cbc3e6bcca7f4963fe23a31b018..50d2811f1b9cd2bebe84f6d093fc7ce0c8af3161 100644 (file)
@@ -243,6 +243,7 @@ func (p *Package) writeDefs() {
                if err != nil {
                        fatalf("%s", err)
                }
+               defer fgcch.Close()
                _, err = io.Copy(fexp, fgcch)
                if err != nil {
                        fatalf("%s", err)