1
0
mirror of https://github.com/golang/go synced 2024-11-17 17:44:46 -07:00

cmd/cgo: close file

Change-Id: Ia70edc8ba22e31e498fe07946db41882804bd39f
GitHub-Last-Rev: 280232e879
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>
This commit is contained in:
alex-semenyuk 2020-05-17 16:05:05 +00:00 committed by Ian Lance Taylor
parent 06337823ef
commit 6dad1b4c9b

View 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)