mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
vz: fix memory leaks in prlsdkLoadDomains
Free sdkdom on any result of prlsdkNewDomainByHandle. Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
This commit is contained in:
parent
b5e08e8c7e
commit
e126352e93
@ -1810,10 +1810,9 @@ prlsdkLoadDomains(vzDriverPtr driver)
|
||||
pret = PrlResult_GetParamByIndex(result, i, &sdkdom);
|
||||
prlsdkCheckRetGoto(pret, error);
|
||||
|
||||
if (!(dom = prlsdkNewDomainByHandle(driver, sdkdom)))
|
||||
continue;
|
||||
if ((dom = prlsdkNewDomainByHandle(driver, sdkdom)))
|
||||
virObjectUnlock(dom);
|
||||
|
||||
virObjectUnlock(dom);
|
||||
PrlHandle_Free(sdkdom);
|
||||
sdkdom = PRL_INVALID_HANDLE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user