mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-21 21:25:25 +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