[libvirt] [libvirt-glib] examples: Don't leak mainloop in conn-test.c

Christophe Fergeau cfergeau at redhat.com
Wed Jul 22 12:56:53 UTC 2015


The program exits right after this, so it's no big deal, but this gives
us a clean valgrind --leak-check=full output.
---
 examples/conn-test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/conn-test.c b/examples/conn-test.c
index adc6434..ac5880a 100644
--- a/examples/conn-test.c
+++ b/examples/conn-test.c
@@ -90,7 +90,7 @@ int main(int argc, char **argv)
     gvir_connection_open_async(conn, NULL, do_connection_open, loop);
 
     g_main_loop_run(loop);
-
+    g_main_loop_unref(loop);
 
     return 0;
 }
-- 
2.4.3




More information about the libvir-list mailing list