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@xxxxxxxxxxxxx> --- src/vz/vz_sdk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index ec954dd..614dca1 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -2197,8 +2197,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); -- 2.4.11 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list