[ELF] Fix use after free.