commit f10d1e2e94c50 introduced another bug while fixing memory leak.
Use the braces with if condition.

Signed-off-by: Pratyush Anand <[email protected]>
---
 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


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Reply via email to