From: Jiri Denemark Date: Wed, 11 Sep 2013 13:49:48 +0000 (+0200) Subject: virsh domjobinfo: Do not return 1 if job is NONE X-Git-Tag: CVE-2013-4311~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f084caae7c5db8ae03e7fafce164c73f65681843;p=thirdparty%2Flibvirt.git virsh domjobinfo: Do not return 1 if job is NONE https://bugzilla.redhat.com/show_bug.cgi?id=1006864 Commit 38ab1225 changed the default value of ret from true to false but forgot to set ret = true when job is NONE. Thus, virsh domjobinfo returned 1 when there was no job running for a domain but it used to (and should) return 0 in this case. --- diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 74feca17c9..3479a1c430 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -5018,6 +5018,7 @@ cmdDomjobinfo(vshControl *ctl, const vshCmd *cmd) case VIR_DOMAIN_JOB_NONE: default: vshPrint(ctl, "%-12s\n", _("None")); + ret = true; goto cleanup; }