wayland: Avoid GVariant leak in set_gnome_env

https://gitlab.gnome.org/GNOME/mutter/merge_requests/1020
This commit is contained in:
Sebastian Keller 2020-01-24 18:47:43 +01:00 committed by Georges Basile Stavracas Neto
parent 9feda1c58b
commit a63e80ec64

View File

@ -266,13 +266,14 @@ set_gnome_env (const char *name,
{ {
GDBusConnection *session_bus; GDBusConnection *session_bus;
GError *error = NULL; GError *error = NULL;
g_autoptr (GVariant) result = NULL;
setenv (name, value, TRUE); setenv (name, value, TRUE);
session_bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL); session_bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
g_assert (session_bus); g_assert (session_bus);
g_dbus_connection_call_sync (session_bus, result = g_dbus_connection_call_sync (session_bus,
"org.gnome.SessionManager", "org.gnome.SessionManager",
"/org/gnome/SessionManager", "/org/gnome/SessionManager",
"org.gnome.SessionManager", "org.gnome.SessionManager",