[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH 2/2] vz: fix event handle leak in prlsdkHandlePerfEvent



On Wed, Feb 08, 2017 at 06:28:34PM +0300, Maxim Nestratov wrote:
> 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>
> ---
>  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);

ACK

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]