Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 169736
b: refs/heads/master
c: e57cfcd
h: refs/heads/master
v: v3
  • Loading branch information
Pekka Enberg authored and Ingo Molnar committed Nov 22, 2009
1 parent 38e16d1 commit 5546862
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f3ced7cdb24e7968a353d828955fa2daf4167e72
refs/heads/master: e57cfcdac6badd846a1cd831de54a1359c2d1eea
5 changes: 5 additions & 0 deletions trunk/tools/perf/util/symbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,7 @@ int filename__read_build_id(const char *filename, void *bf, size_t size)
GElf_Shdr shdr;
Elf_Data *data;
Elf_Scn *sec;
Elf_Kind ek;
void *ptr;
Elf *elf;

Expand All @@ -937,6 +938,10 @@ int filename__read_build_id(const char *filename, void *bf, size_t size)
goto out_close;
}

ek = elf_kind(elf);
if (ek != ELF_K_ELF)
goto out_elf_end;

if (gelf_getehdr(elf, &ehdr) == NULL) {
pr_err("%s: cannot get elf header.\n", __func__);
goto out_elf_end;
Expand Down

0 comments on commit 5546862

Please sign in to comment.