[PATCH v4 1/2] objtool: fix failed cold symbol doublefree

2018-11-20 Thread Artem Savkov
If read_symbols() fails during second list traversal (the one dealing with ".cold" subfunctions) it frees the symbol, but never deletes it from the list/hash_table resulting in symbol being freed again in elf_close(). Fix by just returning an error leaving cleanup to elf_close(). Fixes:

[PATCH v4 1/2] objtool: fix failed cold symbol doublefree

2018-11-20 Thread Artem Savkov
If read_symbols() fails during second list traversal (the one dealing with ".cold" subfunctions) it frees the symbol, but never deletes it from the list/hash_table resulting in symbol being freed again in elf_close(). Fix by just returning an error leaving cleanup to elf_close(). Fixes: