Re: [libvirt-glib] config: Fix 2 leaks in domain memory setters

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

 



Sorry, sent twice to the list by mistake, both versions are identical.

Christophe

On Thu, Mar 28, 2013 at 05:41:54PM +0100, Christophe Fergeau wrote:
> ---
>  libvirt-gconfig/libvirt-gconfig-domain.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/libvirt-gconfig/libvirt-gconfig-domain.c b/libvirt-gconfig/libvirt-gconfig-domain.c
> index be572ab..7ef0be8 100644
> --- a/libvirt-gconfig/libvirt-gconfig-domain.c
> +++ b/libvirt-gconfig/libvirt-gconfig-domain.c
> @@ -414,6 +414,7 @@ void gvir_config_domain_set_memory(GVirConfigDomain *domain, guint64 memory)
>      gvir_config_object_set_attribute(GVIR_CONFIG_OBJECT(node),
>                                       "unit", "KiB",
>                                       NULL);
> +    g_object_unref(G_OBJECT(node));
>      g_object_notify(G_OBJECT(domain), "memory");
>  }
>  
> @@ -439,6 +440,7 @@ void gvir_config_domain_set_current_memory(GVirConfigDomain *domain,
>      gvir_config_object_set_attribute(GVIR_CONFIG_OBJECT(node),
>                                       "unit", "KiB",
>                                       NULL);
> +    g_object_unref(G_OBJECT(node));
>      g_object_notify(G_OBJECT(domain), "current-memory");
>  }
>  
> -- 
> 1.8.1.4
> 
> --
> libvir-list mailing list
> libvir-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libvir-list

Attachment: pgpgZ7J3BEoHW.pgp
Description: PGP signature

--
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]