commit | 274fde9a36bf62f62f9ffda4b178df437649e8bf | [log] [tgz] |
---|---|---|
author | Ian Lance Taylor <iant@golang.org> | Mon Jul 16 16:17:27 2018 -0700 |
committer | Ian Lance Taylor <iant@golang.org> | Mon Jul 16 23:37:14 2018 +0000 |
tree | 1dd42f343691bb5f4ba3f82fb347b3511cc4b508 | |
parent | 4b0c8b0136ee54e779b9eddf7ba00f6ecfeb9f6f [diff] |
cmd/internal/buildid: close ELF file after reading note Updates #26400 Change-Id: I1747d1f1018521cdfa4b3ed13412a944829967cf Reviewed-on: https://go-review.googlesource.com/124235 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/src/cmd/internal/buildid/note.go b/src/cmd/internal/buildid/note.go index 5895da9..2d26ea9 100644 --- a/src/cmd/internal/buildid/note.go +++ b/src/cmd/internal/buildid/note.go
@@ -30,6 +30,7 @@ if err != nil { return nil, err } + defer f.Close() for _, sect := range f.Sections { if sect.Type != elf.SHT_NOTE { continue