gdbus-auth: Fix leaks in tests
authorStef Walter <stefw@gnome.org>
Sat, 9 Nov 2013 19:20:50 +0000 (20:20 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 16 Dec 2013 02:07:11 +0000 (21:07 -0500)
https://bugzilla.gnome.org/show_bug.cgi?id=711802

gio/tests/gdbus-auth.c

index 0aba9ca..a61a667 100644 (file)
@@ -198,6 +198,9 @@ test_auth_mechanism (const gchar *allowed_client_mechanism,
 
   g_thread_join (client_thread);
 
+  while (g_main_context_iteration (NULL, FALSE));
+  g_main_loop_unref (loop);
+
   g_object_unref (server);
 }
 
@@ -271,6 +274,7 @@ temp_dbus_keyrings_teardown (void)
   g_dir_close (dir);
   g_assert (rmdir (temp_dbus_keyrings_dir) == 0);
 
+  g_free (temp_dbus_keyrings_dir);
   temp_dbus_keyrings_dir = NULL;
   g_unsetenv ("G_DBUS_COOKIE_SHA1_KEYRING_DIR");
   g_unsetenv ("G_DBUS_COOKIE_SHA1_KEYRING_DIR_IGNORE_PERMISSION");