Change-Id: Idd2a324eb51ffa3f40cb3df03a82a1d6d882295a
GitHub-Last-Rev:
62e22b309d9f4b31b1fb426e4fdbabd04fcc8371
GitHub-Pull-Request: golang/go#71993
Reviewed-on: https://go-review.googlesource.com/c/go/+/653140
Reviewed-by: Than McIntosh <thanm@golang.org>
Commit-Queue: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
fatal("unable to open output meta-data file %s: %v", fpath, err)
}
+ defer func() {
+ if err := mf.Close(); err != nil {
+ fatal("error closing output meta-data file %s: %v", fpath, err)
+ }
+ }()
+
// Encode and write.
mfw := encodemeta.NewCoverageMetaFileWriter(fpath, mf)
err = mfw.Write(finalHash, blobs, mm.Mode(), mm.Granularity())