mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
qemu: Don't update graphic definitions on password change failure
When the password change failed we updated the graphic definition anyways, which is not desired.
This commit is contained in:
parent
65c4ae93b5
commit
00b81636c5
@ -1517,6 +1517,8 @@ qemuDomainChangeGraphics(struct qemud_driver *driver,
|
||||
VIR_DOMAIN_GRAPHICS_TYPE_VNC,
|
||||
&dev->data.vnc.auth,
|
||||
driver->vncPassword);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
/* Steal the new dev's char * reference */
|
||||
VIR_FREE(olddev->data.vnc.auth.passwd);
|
||||
@ -1576,6 +1578,9 @@ qemuDomainChangeGraphics(struct qemud_driver *driver,
|
||||
&dev->data.spice.auth,
|
||||
driver->spicePassword);
|
||||
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
/* Steal the new dev's char * reference */
|
||||
VIR_FREE(olddev->data.spice.auth.passwd);
|
||||
olddev->data.spice.auth.passwd = dev->data.spice.auth.passwd;
|
||||
|
Loading…
x
Reference in New Issue
Block a user