mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-06 04:59:43 +00:00
fix memleak in elf.c
This commit is contained in:
parent
853411cab3
commit
f6739ec3be
@ -368,8 +368,10 @@ static void store_versioninfo_gnu_versym(struct Elf_(r_bin_elf_obj_t) *bin, Elf_
|
||||
const char *link_section_name = "";
|
||||
int num_entries = shdr->sh_size / sizeof (Elf_(Versym));
|
||||
ut8 *data = calloc (num_entries, sizeof (short));
|
||||
if (shdr->sh_link > bin->ehdr.e_shnum)
|
||||
if (shdr->sh_link > bin->ehdr.e_shnum) {
|
||||
free (data);
|
||||
return;
|
||||
}
|
||||
link_shdr = &bin->shdr[shdr->sh_link];
|
||||
|
||||
if (bin->shstrtab && shdr->sh_name < bin->shstrtab_size) {
|
||||
|
Loading…
Reference in New Issue
Block a user