qemu-stable
[Top][All Lists]
Advanced

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

[Qemu-stable] [PATCH 70/79] spapr: fix memory leak in spapr_core_pre_plu


From: Michael Roth
Subject: [Qemu-stable] [PATCH 70/79] spapr: fix memory leak in spapr_core_pre_plug()
Date: Mon, 28 Aug 2017 19:14:45 -0500

From: Greg Kurz <address@hidden>

In case of error, we must ensure the dynamically allocated base_core_type
is freed, like it is done everywhere else in this function.

This is a regression introduced in QEMU 2.9 by commit 8149e2992f78.

Signed-off-by: Greg Kurz <address@hidden>
Signed-off-by: David Gibson <address@hidden>
(cherry picked from commit df8658de43db242ea82183d75cc957c2b0fa013a)
 Conflicts:
        hw/ppc/spapr.c
* fix context dep on 459264ef2
Signed-off-by: Michael Roth <address@hidden>
---
 hw/ppc/spapr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 58c15ef..bda3854 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -2805,7 +2805,7 @@ static void spapr_core_pre_plug(HotplugHandler 
*hotplug_dev, DeviceState *dev,
     if (cc->nr_threads != smp_threads) {
         error_setg(errp, "invalid nr-threads %d, must be %d",
                    cc->nr_threads, smp_threads);
-        return;
+        goto out;
     }
 
     core_slot = spapr_find_cpu_slot(MACHINE(hotplug_dev), cc->core_id, &index);
-- 
2.7.4




reply via email to

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