mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-09 23:10:08 +00:00
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 <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
27b8b035a6
commit
ce41108ecc
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user