tests: Fix some larger memory leaks in gdbus-proxy

Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
Philip Withnall 2019-03-07 13:57:38 +00:00
parent 938f716c2f
commit 3d4a168715
2 changed files with 4 additions and 1 deletions

View File

@ -626,7 +626,9 @@ test_expected_interface (GDBusProxy *proxy)
/* Also check that we complain if setting a cached property of the wrong type */ /* Also check that we complain if setting a cached property of the wrong type */
g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING,
"*Trying to set property y of type s but according to the expected interface the type is y*"); "*Trying to set property y of type s but according to the expected interface the type is y*");
g_dbus_proxy_set_cached_property (proxy, "y", g_variant_new_string ("error_me_out!")); value = g_variant_ref_sink (g_variant_new_string ("error_me_out!"));
g_dbus_proxy_set_cached_property (proxy, "y", value);
g_variant_unref (value);
g_test_assert_expected_messages (); g_test_assert_expected_messages ();
} }

View File

@ -884,6 +884,7 @@ main (int argc, char *argv[])
g_bus_unown_name (owner_id); g_bus_unown_name (owner_id);
g_dbus_node_info_unref (introspection_data); g_dbus_node_info_unref (introspection_data);
g_hash_table_unref (properties);
return 0; return 0;
} }