[Makedumpfile Patch] Fix get_kcore_dump_loads() error case
Atsushi Kumagai
ats-kumagai at wm.jp.nec.com
Thu May 25 18:48:13 PDT 2017
>commit f10d1e2e94c50 introduced another bug while fixing memory leak.
>Use the braces with if condition.
Thanks, I'll merge this into v1.6.2
Atsushi Kumagai
>Signed-off-by: Pratyush Anand <panand at redhat.com>
>---
> elf_info.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>diff --git a/elf_info.c b/elf_info.c
>index 601d66e3f176..69b1719b020f 100644
>--- a/elf_info.c
>+++ b/elf_info.c
>@@ -893,9 +893,10 @@ int get_kcore_dump_loads(void)
> if (p->phys_start == NOT_PADDR
> || !is_phys_addr(p->virt_start))
> continue;
>- if (j >= loads)
>+ if (j >= loads) {
> free(pls);
> return FALSE;
>+ }
>
> if (j == 0) {
> offset_pt_load_memory = p->file_offset;
>--
>2.9.3
More information about the kexec
mailing list