diff options
Diffstat (limited to 'util_lib/elf_info.c')
-rw-r--r-- | util_lib/elf_info.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util_lib/elf_info.c b/util_lib/elf_info.c index 676926ca..51d8b926 100644 --- a/util_lib/elf_info.c +++ b/util_lib/elf_info.c @@ -605,8 +605,10 @@ static int scan_notes(int fd, loff_t start, loff_t lsize) scan_vmcoreinfo(n_desc, n_descsz); } - if ((note + sizeof(Elf_Nhdr)) == last) + if ((note + sizeof(Elf_Nhdr)) == last) { + free(buf); return -1; + } free(buf); |