Re: [PATCH 08/10] event: avoid memory leak on cleanup

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

 



On Thu, Jun 02, 2011 at 05:08:00PM -0600, Eric Blake wrote:
> Detected by Coverity.  Introduced in commit aaf2b70, and turned into
> a regression in the next few commits through 4e6e6672 (unreleased).
> 
> * src/conf/domain_event.c (virDomainEventStateFree): Free object,
> per documentation.
> ---
>  src/conf/domain_event.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/src/conf/domain_event.c b/src/conf/domain_event.c
> index 34a9d91..fabc1a5 100644
> --- a/src/conf/domain_event.c
> +++ b/src/conf/domain_event.c
> @@ -1,7 +1,7 @@
>  /*
>   * domain_event.c: domain event queue processing helpers
>   *
> - * Copyright (C) 2010 Red Hat, Inc.
> + * Copyright (C) 2010-2011 Red Hat, Inc.
>   * Copyright (C) 2008 VirtualIron
>   *
>   * This library is free software; you can redistribute it and/or
> @@ -555,6 +555,7 @@ virDomainEventStateFree(virDomainEventStatePtr state)
> 
>      if (state->timer != -1)
>          virEventRemoveTimeout(state->timer);
> +    VIR_FREE(state);
>  }

  ACK, otherwise we leak in various ways from different drivers,

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]