tests/meta-context-test: Free D-Bus call results
Don't leak the resulting `GVariant`. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2817>
This commit is contained in:
parent
678bc69e72
commit
1a814250c0
@ -64,6 +64,7 @@ add_colord_system_profile (const char *cd_profile_id,
|
||||
GDBusProxy *proxy;
|
||||
g_autoptr (GError) error = NULL;
|
||||
GVariantBuilder params_builder;
|
||||
g_autoptr (GVariant) ret = NULL;
|
||||
|
||||
proxy = get_colord_mock_proxy ();
|
||||
|
||||
@ -71,11 +72,12 @@ add_colord_system_profile (const char *cd_profile_id,
|
||||
g_variant_builder_add (¶ms_builder, "s", cd_profile_id);
|
||||
g_variant_builder_add (¶ms_builder, "s", file_path);
|
||||
|
||||
if (!g_dbus_proxy_call_sync (proxy,
|
||||
"AddSystemProfile",
|
||||
g_variant_builder_end (¶ms_builder),
|
||||
G_DBUS_CALL_FLAGS_NO_AUTO_START, -1, NULL,
|
||||
&error))
|
||||
ret = g_dbus_proxy_call_sync (proxy,
|
||||
"AddSystemProfile",
|
||||
g_variant_builder_end (¶ms_builder),
|
||||
G_DBUS_CALL_FLAGS_NO_AUTO_START, -1, NULL,
|
||||
&error);
|
||||
if (ret == NULL)
|
||||
g_error ("Failed to add system profile: %s", error->message);
|
||||
}
|
||||
|
||||
|
@ -390,10 +390,11 @@ meta_context_test_init (MetaContextTest *context_test)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!g_dbus_proxy_call_sync (proxy,
|
||||
"Reset",
|
||||
NULL,
|
||||
G_DBUS_CALL_FLAGS_NO_AUTO_START, -1, NULL,
|
||||
&error))
|
||||
ret = g_dbus_proxy_call_sync (proxy,
|
||||
"Reset",
|
||||
NULL,
|
||||
G_DBUS_CALL_FLAGS_NO_AUTO_START, -1, NULL,
|
||||
&error);
|
||||
if (ret == NULL)
|
||||
g_warning ("Failed to clear mocked color devices: %s", error->message);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user