mirror of https://gitee.com/openkylin/libvirt.git
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:
parent
05456cc97e
commit
c52f5bea0d
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue