From: Michal Privoznik Date: Wed, 15 Feb 2017 14:40:01 +0000 (+0100) Subject: qemu_conf: Properly check for retval of qemuDomainNamespaceAvailable X-Git-Tag: CVE-2017-2635~106 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27ac5f3741e3a426a2b06b2b0a217419a82033ad;p=thirdparty%2Flibvirt.git qemu_conf: Properly check for retval of qemuDomainNamespaceAvailable This function is returning a boolean therefore check for '< 0' makes no sense. It should have been '!qemuDomainNamespaceAvailable'. Signed-off-by: Michal Privoznik --- diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c index ad482d0ee9..b5b0645126 100644 --- a/src/qemu/qemu_conf.c +++ b/src/qemu/qemu_conf.c @@ -837,7 +837,7 @@ int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg, goto cleanup; } - if (qemuDomainNamespaceAvailable(ns) < 0) { + if (!qemuDomainNamespaceAvailable(ns)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("%s namespace is not available"), namespaces[i]);