From: Michal Privoznik Date: Wed, 7 Feb 2024 12:28:31 +0000 (+0100) Subject: virsh-domain: Fix return of virshGetDBusDisplay() in one error path X-Git-Tag: v10.1.0-rc1~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce41108eccd7688dd19cd4c2ba7fc2aa0080b2ad;p=thirdparty%2Flibvirt.git virsh-domain: Fix return of virshGetDBusDisplay() in one error path The virshGetDBusDisplay() function is declared to return a pointer and yet, in one error path false is returned. Switch the statement to return NULL, which is what other error paths use to indicate an error. Signed-off-by: Michal Privoznik Reviewed-by: Ján Tomko --- diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 58d5a4ab57..e69d14a6aa 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -11908,7 +11908,7 @@ virshGetDBusDisplay(vshControl *ctl, xmlXPathContext *ctxt) addr = virXPathString(xpath, ctxt); if (!addr) - return false; + return NULL; if (STRPREFIX(addr, "unix:path=")) { return g_strdup_printf("dbus+unix://%s", addr + 10);