[libvirt-glib] gconfig: Fix small leak in test-domain-create

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

 



The object returned by gvir_config_domain_disk_get_driver() must be
unref'ed when no longer used.
---
 libvirt-gconfig/tests/test-domain-create.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libvirt-gconfig/tests/test-domain-create.c b/libvirt-gconfig/tests/test-domain-create.c
index eb4b945..417d3d0 100644
--- a/libvirt-gconfig/tests/test-domain-create.c
+++ b/libvirt-gconfig/tests/test-domain-create.c
@@ -284,6 +284,7 @@ int main(int argc, char **argv)
     g_assert(gvir_config_domain_disk_driver_get_copy_on_read(driver));
     g_assert(gvir_config_domain_disk_get_target_bus(disk) == GVIR_CONFIG_DOMAIN_DISK_BUS_IDE);
     g_str_const_check(gvir_config_domain_disk_get_target_dev(disk), "hda");
+    g_object_unref(driver);
 
 
     /* network interfaces node */
-- 
2.3.5

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