Message ID | 146723344568.9665.8138511936964587804.stgit@bahia.lan (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Jun 29, 2016 at 10:50:45PM +0200, Greg Kurz wrote: > Signed-off-by: Greg Kurz <groug@kaod.org> > --- > hw/ppc/spapr_cpu_core.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c > index 2615058da745..a15dc010626d 100644 > --- a/hw/ppc/spapr_cpu_core.c > +++ b/hw/ppc/spapr_cpu_core.c > @@ -101,9 +101,8 @@ static void spapr_core_release(DeviceState *dev, void *opaque) > sPAPRCPUCore *sc = SPAPR_CPU_CORE(OBJECT(dev)); > const char *typename = object_class_get_name(sc->cpu_class); > size_t size = object_type_get_instance_size(typename); > sPAPRMachineState *spapr = SPAPR_MACHINE(qdev_get_machine()); > - sPAPRCPUCore *core = SPAPR_CPU_CORE(OBJECT(dev)); > CPUCore *cc = CPU_CORE(dev); > int smt = kvmppc_smt_threads(); > int i; > > @@ -119,9 +118,9 @@ static void spapr_core_release(DeviceState *dev, void *opaque) > } > > spapr->cores[cc->core_id / smt] = NULL; > > - g_free(core->threads); > + g_free(sc->threads); > object_unparent(OBJECT(dev)); > } > > void spapr_core_unplug(HotplugHandler *hotplug_dev, DeviceState *dev, Reviewed-by: Bharata B Rao <bharata@linux.vnet.ibm.com>
diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index 2615058da745..a15dc010626d 100644 --- a/hw/ppc/spapr_cpu_core.c +++ b/hw/ppc/spapr_cpu_core.c @@ -101,9 +101,8 @@ static void spapr_core_release(DeviceState *dev, void *opaque) sPAPRCPUCore *sc = SPAPR_CPU_CORE(OBJECT(dev)); const char *typename = object_class_get_name(sc->cpu_class); size_t size = object_type_get_instance_size(typename); sPAPRMachineState *spapr = SPAPR_MACHINE(qdev_get_machine()); - sPAPRCPUCore *core = SPAPR_CPU_CORE(OBJECT(dev)); CPUCore *cc = CPU_CORE(dev); int smt = kvmppc_smt_threads(); int i; @@ -119,9 +118,9 @@ static void spapr_core_release(DeviceState *dev, void *opaque) } spapr->cores[cc->core_id / smt] = NULL; - g_free(core->threads); + g_free(sc->threads); object_unparent(OBJECT(dev)); } void spapr_core_unplug(HotplugHandler *hotplug_dev, DeviceState *dev,
Signed-off-by: Greg Kurz <groug@kaod.org> --- hw/ppc/spapr_cpu_core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)