Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x86/kexec: Fix double-free of elf header buffer
After b3e34a4 ("x86/kexec: fix memory leak of elf header buffer"), freeing image->elf_headers in the error path of crash_load_segments() is not needed because kimage_file_post_load_cleanup() will take care of that later. And not clearing it could result in a double-free. Drop the superfluous vfree() call at the error path of crash_load_segments(). Fixes: b3e34a4 ("x86/kexec: fix memory leak of elf header buffer") Signed-off-by: Takashi Iwai <[email protected]> Signed-off-by: Borislav Petkov (AMD) <[email protected]> Acked-by: Baoquan He <[email protected]> Acked-by: Vlastimil Babka <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected]
- Loading branch information