[Makedumpfile Patch] Fix get_kcore_dump_loads() error case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux