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

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



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


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