mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 19:45:21 +00:00
virsh-domain: fix memory leak in cmdDomDisplay
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
378ef3df57
commit
b1f6792cb6
@ -10637,8 +10637,10 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd)
|
||||
* fails, if there is no listen_addr we will print "localhost". */
|
||||
VIR_FREE(listen_addr);
|
||||
|
||||
if (uri && VIR_STRDUP(listen_addr, uri->server) < 0)
|
||||
goto cleanup;
|
||||
if (uri) {
|
||||
listen_addr = vshStrdup(ctl, uri->server);
|
||||
virURIFree(uri);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user