x86: fix BAD_FREE in get_efi_runtime_map()
Subsystems (2)
PATCH 1/1 x86: fix BAD_FREE in get_efi_runtime_map()
If the err_out label is reached, address of a stack variable is passed to free(). Fix it.
Signed-off-by Pingfan Liu <[email protected]>
--- kexec/arch/i386/x86-linux-setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kexec/arch/i386/x86-linux-setup.c +2 -2
@@ -595,8 +595,8 @@ static int get_efi_runtime_map(struct efi_mem_descriptor **map)closedir (dirp);return nr_maps; err_out: -if (map) -free (map); +if (*map) +free (*map);closedir (dirp);return 0 ; }
Signature · 7 lines
2.7.4 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Simon Horman
AppliedQuoted 4 lines · Pingfan Liu
If the
err_outlabel is reached, address of a stack variable is passed tofree(). Fix it.Signed-off-by Pingfan Liu <[email protected]>
Thanks, applied.
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec