1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +00:00

vz: fix event handle leak in prlsdkHandlePerfEvent

When we happen to lose a domain but still get a performance event
for it, we should also free the event handle.

Signed-off-by: Maxim Nestratov <mnestratov@virtuozzo.com>
This commit is contained in:
Maxim Nestratov 2017-02-08 17:14:12 +03:00
parent 05456cc97e
commit c52f5bea0d

View File

@ -2230,8 +2230,10 @@ prlsdkHandlePerfEvent(vzDriverPtr driver,
virDomainObjPtr dom = NULL;
vzDomObjPtr privdom = NULL;
if (!(dom = virDomainObjListFindByUUID(driver->domains, uuid)))
if (!(dom = virDomainObjListFindByUUID(driver->domains, uuid))) {
PrlHandle_Free(event);
return;
}
privdom = dom->privateData;
PrlHandle_Free(privdom->stats);