qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [RFC PATCH 5/5] bootindex: fix memory leak when set boot in


From: arei.gonglei
Subject: [Qemu-devel] [RFC PATCH 5/5] bootindex: fix memory leak when set boot index
Date: Mon, 7 Jul 2014 17:11:01 +0800

From: Chenliang <address@hidden>

get_boot_devices_list will malloc some memory, spapr_finalize_fdt
doesn't free it.

Signed-off-by: Chenliang <address@hidden>
Signed-off-by: Gonglei <address@hidden>
---
 hw/ppc/spapr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 82f183f..502868e 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -795,6 +795,7 @@ static void spapr_finalize_fdt(sPAPREnvironment *spapr,
 
         }
         ret = fdt_setprop_string(fdt, offset, "qemu,boot-list", bootlist);
+        g_free(bootlist);
     }
 
     if (!spapr->has_graphics) {
-- 
1.7.12.4





reply via email to

[Prev in Thread] Current Thread [Next in Thread]