[glib/wip/gcleanup] gdbus-connection: Fix leaks in tests
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/gcleanup] gdbus-connection: Fix leaks in tests
- Date: Sat, 9 Nov 2013 19:57:01 +0000 (UTC)
commit 4e54ce7b4099d243b955396ddb90156221d7ad3e
Author: Stef Walter <stefw gnome org>
Date: Sat Nov 9 20:21:44 2013 +0100
gdbus-connection: Fix leaks in tests
gio/tests/gdbus-connection.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gio/tests/gdbus-connection.c b/gio/tests/gdbus-connection.c
index 09a0dd2..a2082e8 100644
--- a/gio/tests/gdbus-connection.c
+++ b/gio/tests/gdbus-connection.c
@@ -1092,6 +1092,7 @@ send_bogus_message (GDBusConnection *c, guint32 *out_serial)
error = NULL;
g_dbus_connection_send_message (c, m, G_DBUS_SEND_MESSAGE_FLAGS_NONE, out_serial, &error);
g_assert_no_error (error);
+ g_object_unref (m);
}
static gpointer
@@ -1221,6 +1222,7 @@ int
main (int argc,
char *argv[])
{
+ int ret;
g_test_init (&argc, &argv, NULL);
/* all the tests rely on a shared main loop */
@@ -1235,5 +1237,8 @@ main (int argc,
g_test_add_func ("/gdbus/connection/signal-match-rules", test_connection_signal_match_rules);
g_test_add_func ("/gdbus/connection/filter", test_connection_filter);
g_test_add_func ("/gdbus/connection/serials", test_connection_serials);
- return g_test_run();
+ ret = g_test_run();
+
+ g_main_loop_unref (loop);
+ return ret;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]