Commit 35435b27 authored by Ian Lance Taylor's avatar Ian Lance Taylor

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: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent ccb8735b
......@@ -1017,6 +1017,7 @@ func hostobjCopy() (paths []string) {
if err != nil {
Exitf("cannot reopen %s: %v", h.pn, err)
}
defer f.Close()
if _, err := f.Seek(h.off, 0); err != nil {
Exitf("cannot seek %s: %v", h.pn, err)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment