mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
vz: make error handling idiomatic in prlsdkCreateVm
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
This commit is contained in:
parent
e43fb4ee77
commit
c2f5dc24c5
@ -3900,13 +3900,14 @@ prlsdkCreateVm(vzDriverPtr driver, virDomainDefPtr def)
|
|||||||
pret = PrlVmCfg_SetOfflineManagementEnabled(sdkdom, 0);
|
pret = PrlVmCfg_SetOfflineManagementEnabled(sdkdom, 0);
|
||||||
prlsdkCheckRetGoto(pret, cleanup);
|
prlsdkCheckRetGoto(pret, cleanup);
|
||||||
|
|
||||||
ret = prlsdkDoApplyConfig(driver, sdkdom, def, NULL);
|
if (prlsdkDoApplyConfig(driver, sdkdom, def, NULL) < 0)
|
||||||
if (ret)
|
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
job = PrlVm_Reg(sdkdom, "", 1);
|
job = PrlVm_Reg(sdkdom, "", 1);
|
||||||
if (PRL_FAILED(waitJob(job)))
|
if (PRL_FAILED(waitJob(job)))
|
||||||
ret = -1;
|
goto cleanup;
|
||||||
|
|
||||||
|
ret = 0;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
PrlHandle_Free(sdkdom);
|
PrlHandle_Free(sdkdom);
|
||||||
|
Loading…
Reference in New Issue
Block a user