From: Jiri Denemark Date: Thu, 2 Feb 2017 21:04:25 +0000 (+0100) Subject: cpu: Use virCPUData.arch in cpuDecode X-Git-Tag: CVE-2017-2635~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82ddd0b1550efa899f1bded14adc66410648d120;p=thirdparty%2Flibvirt.git cpu: Use virCPUData.arch in cpuDecode virCPUDef.arch is not required to be filled in for guest CPU definitions. It doesn't make sense to artificially mandate it to be set when cpuDecode is called especially when virCPUData.arch passed to cpuDecode already contains the architecture. Signed-off-by: Jiri Denemark --- diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c index 3063f00eb6..6a808a0c17 100644 --- a/src/cpu/cpu.c +++ b/src/cpu/cpu.c @@ -240,7 +240,7 @@ cpuDecode(virCPUDefPtr cpu, return -1; } - if ((driver = cpuGetSubDriver(cpu->arch)) == NULL) + if ((driver = cpuGetSubDriver(data->arch)) == NULL) return -1; if (driver->decode == NULL) {