summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2008-01-08 20:56:58 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2008-01-08 20:56:58 +0000
commitac67637385e335e49b39a60e19b153a0cb2418b5 (patch)
tree949801b810c4ced19b7610a4cadb113e6dd7b696 /tests
parentc952e4482ff27060427d066a5396563b560e0e93 (diff)
test-dbus: be less leaky
Diffstat (limited to 'tests')
-rw-r--r--tests/dbus/test-dbus.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/dbus/test-dbus.c b/tests/dbus/test-dbus.c
index d181ad5a9..e01f4a0ac 100644
--- a/tests/dbus/test-dbus.c
+++ b/tests/dbus/test-dbus.c
@@ -71,6 +71,8 @@ int
main (int argc,
char **argv)
{
+ guint i;
+
tp_debug_set_flags ("all");
mainloop = g_main_loop_new (NULL, FALSE);
@@ -170,5 +172,15 @@ main (int argc,
g_assert (!tp_strdiff (g_ptr_array_index (events, 8),
"[4] net.example 0"));
+ /* keep valgrind happy, at least in the successful case */
+ for (i = 0; i < events->len; i++)
+ {
+ g_free (events->pdata[i]);
+ }
+
+ g_ptr_array_free (events, TRUE);
+ g_main_loop_unref (mainloop);
+ mainloop = NULL;
+
return 0;
}