Takashi Iwai d00dd2f264 x86/kexec: Fix double-free of elf header buffer
After

  b3e34a47f989 ("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: b3e34a47f989 ("x86/kexec: fix memory leak of elf header buffer")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Baoquan He <bhe@redhat.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: <stable@kernel.org>
Link: https://lore.kernel.org/r/20221122115122.13937-1-tiwai@suse.de
2023-01-02 18:56:21 +01:00
..
2022-12-13 19:29:45 -08:00
2022-12-13 19:29:45 -08:00
2022-12-19 16:07:59 -06:00
2022-12-21 09:37:14 -08:00
2022-12-19 07:51:30 -06:00
2022-12-13 19:29:45 -08:00
2022-12-19 08:23:27 -06:00
2022-12-13 19:29:45 -08:00
2022-12-23 10:49:45 -08:00
2022-12-13 19:29:45 -08:00
2022-12-13 19:29:45 -08:00
2022-12-21 18:52:15 -08:00
2022-12-13 19:29:45 -08:00
2022-12-17 14:06:53 -06:00
2022-12-13 19:29:45 -08:00
2022-12-16 13:46:41 -06:00