[libvirt-glib 1/4] gconfig: Fix leak in gvir_config_domain_filesys_set_ram_usage

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

 



The object returned by gvir_config_object_replace_child() must be
unref'ed when no longer needed.
---
 libvirt-gconfig/libvirt-gconfig-domain-filesys.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libvirt-gconfig/libvirt-gconfig-domain-filesys.c b/libvirt-gconfig/libvirt-gconfig-domain-filesys.c
index 860480c..97b7bd6 100644
--- a/libvirt-gconfig/libvirt-gconfig-domain-filesys.c
+++ b/libvirt-gconfig/libvirt-gconfig-domain-filesys.c
@@ -201,7 +201,7 @@ void gvir_config_domain_filesys_set_ram_usage(GVirConfigDomainFilesys *filesys,
                                                "usage", G_TYPE_UINT64, bytes,
                                                "units", G_TYPE_STRING, "bytes",
                                                NULL);
-
+    g_object_unref(G_OBJECT(src));
 }
 
 void gvir_config_domain_filesys_set_target(GVirConfigDomainFilesys *filesys,
-- 
2.4.3

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