Commit 735e38ca authored by Dmitriy Vyukov's avatar Dmitriy Vyukov

debug/elf: fix nil deref in test

LGTM=crawshaw
R=golang-codereviews, crawshaw
CC=golang-codereviews
https://golang.org/cl/109470044
parent 67afeac2
......@@ -166,11 +166,11 @@ func TestOpen(t *testing.T) {
} else {
f, err = Open(tt.file)
}
defer f.Close()
if err != nil {
t.Errorf("cannot open file %s: %v", tt.file, err)
continue
}
defer f.Close()
if !reflect.DeepEqual(f.FileHeader, tt.hdr) {
t.Errorf("open %s:\n\thave %#v\n\twant %#v\n", tt.file, f.FileHeader, tt.hdr)
continue
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment