mirror of https://github.com/golang/go.git
cmd/go: close elf file in the readpkglist function
Change-Id: Ief08e311598152f047878fc0fe6a6e37df372ee9
GitHub-Last-Rev: daec402b39
GitHub-Pull-Request: golang/go#66588
Reviewed-on: https://go-review.googlesource.com/c/go/+/575156
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
This commit is contained in:
parent
0bf6071066
commit
ba9c445f16
|
|
@ -384,6 +384,7 @@ func readpkglist(shlibpath string) (pkgs []*load.Package) {
|
|||
if err != nil {
|
||||
base.Fatal(fmt.Errorf("failed to open shared library: %v", err))
|
||||
}
|
||||
defer f.Close()
|
||||
sect := f.Section(".go_export")
|
||||
if sect == nil {
|
||||
base.Fatal(fmt.Errorf("%s: missing .go_export section", shlibpath))
|
||||
|
|
|
|||
Loading…
Reference in New Issue