MCPcopy Create free account
hub / github.com/coreboot/coreboot / parsed_elf_destroy

Function parsed_elf_destroy

util/cbfstool/elfheaders.c:554–572  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

552}
553
554void parsed_elf_destroy(struct parsed_elf *pelf)
555{
556 Elf64_Half i;
557
558 free(pelf->phdr);
559 free(pelf->shdr);
560 if (pelf->relocs != NULL) {
561 for (i = 0; i < pelf->ehdr.e_shnum; i++)
562 free(pelf->relocs[i]);
563 }
564 free(pelf->relocs);
565
566 if (pelf->strtabs != NULL) {
567 for (i = 0; i < pelf->ehdr.e_shnum; i++)
568 free(pelf->strtabs[i]);
569 }
570 free(pelf->strtabs);
571 free(pelf->syms);
572}
573
574/* Get the headers from the buffer.
575 * Return -1 in the event of an error.

Callers 6

qualcomm_find_hash_mbnv7Function · 0.85
qualcomm_find_hashFunction · 0.85
rmodule_cleanupFunction · 0.85
parse_elf_to_stageFunction · 0.85
parse_elfFunction · 0.85
elf_headersFunction · 0.85

Calls 1

freeFunction · 0.50

Tested by

no test coverage detected