mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/link: close input files when copying to temporary directory
Fixes #29110 Change-Id: I077d1a9caa7f4545de1418cec718c4a37ac36ef8 Reviewed-on: https://go-review.googlesource.com/c/152757 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
ccb8735ba2
commit
35435b27c4
1 changed files with 1 additions and 0 deletions
|
|
@ -1017,6 +1017,7 @@ func hostobjCopy() (paths []string) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
Exitf("cannot reopen %s: %v", h.pn, err)
|
Exitf("cannot reopen %s: %v", h.pn, err)
|
||||||
}
|
}
|
||||||
|
defer f.Close()
|
||||||
if _, err := f.Seek(h.off, 0); err != nil {
|
if _, err := f.Seek(h.off, 0); err != nil {
|
||||||
Exitf("cannot seek %s: %v", h.pn, err)
|
Exitf("cannot seek %s: %v", h.pn, err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue