[PATCH] libelf: Return already gotten Elf_Data from elf_getdata_rawchunk

2022-04-01 Thread Mark Wielaard
elf_getdata_rawchunk keeps a list of Elf_Data_Chunk to track which Elf_Data structures have already been requested. This allows elf_end to clean up all internal data structures and the Elf_Data d_buf if it was malloced. But it didn't check if a chunk was already requested earlier. This meant that

[PATCHv2] libelf: Return already gotten Elf_Data from elf_getdata_rawchunk

2022-04-01 Thread Mark Wielaard
elf_getdata_rawchunk keeps a list of Elf_Data_Chunk to track which Elf_Data structures have already been requested. This allows elf_end to clean up all internal data structures and the Elf_Data d_buf if it was malloced. But it didn't check if a chunk was already requested earlier. This meant that