From 80e5db303dc82e357df923dc2bfcb858c20282a0 Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Wed, 18 Jan 2017 18:13:20 +0100 Subject: machine: Make possible_cpu_arch_ids() return const pointer make sure that external callers won't try to modify possible_cpus and owner of possible_cpus can access it directly when it modifies it. Signed-off-by: Igor Mammedov Message-Id: <1484759609-264075-5-git-send-email-imammedo@redhat.com> Reviewed-by: Eduardo Habkost Signed-off-by: Eduardo Habkost --- hw/acpi/cpu_hotplug.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'hw/acpi/cpu_hotplug.c') diff --git a/hw/acpi/cpu_hotplug.c b/hw/acpi/cpu_hotplug.c index f15a240..5243918 100644 --- a/hw/acpi/cpu_hotplug.c +++ b/hw/acpi/cpu_hotplug.c @@ -128,7 +128,7 @@ void build_legacy_cpu_hotplug_aml(Aml *ctx, MachineState *machine, Aml *zero = aml_int(0); Aml *one = aml_int(1); MachineClass *mc = MACHINE_GET_CLASS(machine); - CPUArchIdList *apic_ids = mc->possible_cpu_arch_ids(machine); + const CPUArchIdList *apic_ids = mc->possible_cpu_arch_ids(machine); PCMachineState *pcms = PC_MACHINE(machine); /* @@ -329,8 +329,6 @@ void build_legacy_cpu_hotplug_aml(Aml *ctx, MachineState *machine, apic_idx = apic_id + 1; } aml_append(sb_scope, aml_name_decl(CPU_ON_BITMAP, pkg)); - g_free(apic_ids); - aml_append(ctx, sb_scope); method = aml_method("\\_GPE._E02", 0, AML_NOTSERIALIZED); -- cgit v1.1