mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
qemu: Change some gotos in qemuPasstStart to direct return
Jumping to the error label and reading the pidfile does not make sense until we reached qemuSecurityCommandRun which creates the pidfile. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
12d194404c
commit
12a3bee389
@ -209,14 +209,14 @@ qemuPasstStart(virDomainObj *vm,
|
||||
/* validation guarantees this will never happen */
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Invalid portForward proto value %u"), pf->proto);
|
||||
goto error;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (VIR_SOCKET_ADDR_VALID(&pf->address)) {
|
||||
g_autofree char *addr = NULL;
|
||||
|
||||
if (!(addr = virSocketAddrFormat(&pf->address)))
|
||||
goto error;
|
||||
return -1;
|
||||
|
||||
virBufferAddStr(&buf, addr);
|
||||
|
||||
@ -258,7 +258,7 @@ qemuPasstStart(virDomainObj *vm,
|
||||
|
||||
|
||||
if (qemuExtDeviceLogCommand(driver, vm, cmd, "passt") < 0)
|
||||
goto error;
|
||||
return -1;
|
||||
|
||||
if (qemuSecurityCommandRun(driver, vm, cmd, -1, -1, &exitstatus, &cmdret) < 0)
|
||||
goto error;
|
||||
|
Loading…
x
Reference in New Issue
Block a user