gdbus-auth: Fix leaks in tests
[platform/upstream/glib.git] / gio / tests / gdbus-example-peer.c
index 7df1942..b954f74 100644 (file)
@@ -121,7 +121,7 @@ static const GDBusInterfaceVTable interface_vtable =
 
 /* ---------------------------------------------------------------------------------------------------- */
 
-static void
+static gboolean
 on_new_connection (GDBusServer *server,
                    GDBusConnection *connection,
                    gpointer user_data)
@@ -152,6 +152,8 @@ on_new_connection (GDBusServer *server,
                                                        NULL,  /* user_data_free_func */
                                                        NULL); /* GError** */
   g_assert (registration_id > 0);
+
+  return TRUE;
 }
 
 /* ---------------------------------------------------------------------------------------------------- */
@@ -175,8 +177,6 @@ main (int argc, char *argv[])
 
   ret = 1;
 
-  g_type_init ();
-
   opt_address = NULL;
   opt_server = FALSE;
   opt_allow_anonymous = FALSE;