[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 3/5] hw/ppc/spapr: Do not leak the memory of the type
From: |
Thomas Huth |
Subject: |
[Qemu-ppc] [PATCH 3/5] hw/ppc/spapr: Do not leak the memory of the type string |
Date: |
Tue, 9 Aug 2016 11:17:07 +0200 |
The type string is allocated in spapr_get_cpu_core_type()
with g_strdup_printf(), so we should free this memory when we're
done with it.
Signed-off-by: Thomas Huth <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 ec65b07..424b506 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1840,6 +1840,7 @@ static void ppc_spapr_init(MachineState *machine)
object_property_set_int(core, core_id, CPU_CORE_PROP_CORE_ID,
&error_fatal);
object_property_set_bool(core, true, "realized", &error_fatal);
+ g_free(type);
}
}
g_free(type);
--
1.8.3.1
- [Qemu-ppc] [PATCH for-2.7 0/5] spapr: Fix regression in CPU alias handling, Thomas Huth, 2016/08/09
- [Qemu-ppc] [PATCH 1/5] ppc: Introduce a function to look up CPU alias strings, Thomas Huth, 2016/08/09
- [Qemu-ppc] [PATCH 2/5] hw/ppc/spapr: Look up CPU alias names instead of hard-coding the aliases, Thomas Huth, 2016/08/09
- [Qemu-ppc] [PATCH 3/5] hw/ppc/spapr: Do not leak the memory of the type string,
Thomas Huth <=
- [Qemu-ppc] [PATCH 4/5] ppc/kvm: Do not mess up the generic CPU family registration, Thomas Huth, 2016/08/09
- [Qemu-ppc] [PATCH 5/5] ppc/kvm: Register also a generic spapr CPU core family type, Thomas Huth, 2016/08/09
- Re: [Qemu-ppc] [PATCH for-2.7 0/5] spapr: Fix regression in CPU alias handling, Andrea Bolognani, 2016/08/09
- Re: [Qemu-ppc] [PATCH for-2.7 0/5] spapr: Fix regression in CPU alias handling, Bharata B Rao, 2016/08/09
- Re: [Qemu-ppc] [Qemu-devel] [PATCH for-2.7 0/5] spapr: Fix regression in CPU alias handling, Thomas Huth, 2016/08/09