[glib] gdbus-connection: Fix leaks in tests
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] gdbus-connection: Fix leaks in tests
- Date: Mon, 11 Nov 2013 06:17:22 +0000 (UTC)
commit 91c8fb82feae5675f20ac0fcb21226a1b516e5df
Author: Stef Walter <stefw gnome org>
Date: Sat Nov 9 20:21:44 2013 +0100
gdbus-connection: Fix leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=711802
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 56e5b6c..fa726e6 100644
--- a/gio/tests/gdbus-connection.c
+++ b/gio/tests/gdbus-connection.c
@@ -1091,6 +1091,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
@@ -1217,6 +1218,7 @@ int
main (int argc,
char *argv[])
{
+ int ret;
g_test_init (&argc, &argv, NULL);
/* all the tests rely on a shared main loop */
@@ -1231,5 +1233,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]