mirror of
https://github.com/golang/go
synced 2024-10-06 08:00:07 +00:00
cmd/go: close elf file in the readpkglist function
Signed-off-by: guoguangwu <guoguangwug@gmail.com>
This commit is contained in:
parent
bb523c9542
commit
daec402b39
|
@ -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 a new issue