mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/link: avoid leaking file in ldshlibsyms
Change-Id: If27f7fbf94ede6f9a57f2520aaf75e6506e0b3f8 Reviewed-on: https://go-review.googlesource.com/59374 Run-TryBot: Dave Cheney <dave@cheney.net> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Dave Cheney <dave@cheney.net>
This commit is contained in:
parent
b046878018
commit
6eef2bb5ee
1 changed files with 1 additions and 0 deletions
|
|
@ -1562,6 +1562,7 @@ func ldshlibsyms(ctxt *Link, shlib string) {
|
|||
Errorf(nil, "cannot open shared library: %s", libpath)
|
||||
return
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
hash, err := readnote(f, ELF_NOTE_GO_NAME, ELF_NOTE_GOABIHASH_TAG)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue