[dconf] tests/: fix some leaks



commit 4b3d04fba7ad39d7d465feca67eb81e68a4b6123
Author: Ryan Lortie <desrt desrt ca>
Date:   Mon Jul 16 12:21:22 2012 -0400

    tests/: fix some leaks

 tests/dconf-mock-dbus.c |    3 +++
 tests/engine.c          |    3 ++-
 2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/tests/dconf-mock-dbus.c b/tests/dconf-mock-dbus.c
index 401a339..1ae7ba0 100644
--- a/tests/dconf-mock-dbus.c
+++ b/tests/dconf-mock-dbus.c
@@ -34,6 +34,9 @@ dconf_engine_dbus_call_async_func (GBusType                bus_type,
                                    DConfEngineCallHandle  *handle,
                                    GError                **error)
 {
+  g_variant_ref_sink (parameters);
+  g_variant_unref (parameters);
+
   g_queue_push_tail (&dconf_mock_dbus_outstanding_call_handles, handle);
 
   return TRUE;
diff --git a/tests/engine.c b/tests/engine.c
index 2155e43..5d22f27 100644
--- a/tests/engine.c
+++ b/tests/engine.c
@@ -697,7 +697,7 @@ test_read (void)
               guint64 old_state, new_state;
 
               /* Step 2: setup the state */
-              setup_state (n, i, j, state);
+              setup_state (n, i, j, (j != k) ? state : NULL);
 
               /* Step 3: create the engine */
               engine = dconf_engine_new (NULL, NULL);
@@ -744,6 +744,7 @@ test_watch_fast (void)
 
   table = dconf_mock_gvdb_table_new ();
   dconf_mock_gvdb_install ("/HOME/.config/dconf/user", table);
+  table = dconf_mock_gvdb_table_new ();
   dconf_mock_gvdb_install ("/etc/dconf/db/site", table);
 
   triv = g_variant_ref_sink (g_variant_new ("()"));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]