Change-Id: I940c63c3040035e507428798d50060cfd0d04e16
GitHub-Last-Rev:
e27484cd43e21599ba6e798ab74a703ad290ae7c
GitHub-Pull-Request: golang/go#66706
Reviewed-on: https://go-review.googlesource.com/c/go/+/577055
Reviewed-by: Than McIntosh <thanm@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Than McIntosh <thanm@google.com>
if err != nil {
log.Fatalf("capturing host obj: open failed on %s: %v", h.pn, err)
}
+ defer inf.Close()
res := make([]byte, h.length)
if n, err := inf.ReadAt(res, h.off); err != nil || n != int(h.length) {
log.Fatalf("capturing host obj: readat failed on %s: %v", h.pn, err)