shell/network-agent: Fix setting leak in get_secrets_keyring_cb

The setting GVariant was not consumed by anything in the VPN case.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1535>
This commit is contained in:
Sebastian Keller 2020-12-14 15:51:46 +01:00
parent 7b50c38d6d
commit f0deb03bd4

View File

@ -243,7 +243,7 @@ get_secrets_keyring_cb (GObject *source,
GList *l; GList *l;
gboolean secrets_found = FALSE; gboolean secrets_found = FALSE;
GVariantBuilder builder_setting, builder_connection; GVariantBuilder builder_setting, builder_connection;
GVariant *setting; g_autoptr (GVariant) setting = NULL;
items = secret_service_search_finish (NULL, result, &secret_error); items = secret_service_search_finish (NULL, result, &secret_error);
@ -303,7 +303,7 @@ get_secrets_keyring_cb (GObject *source,
} }
g_list_free_full (items, g_object_unref); g_list_free_full (items, g_object_unref);
setting = g_variant_builder_end (&builder_setting); setting = g_variant_ref_sink (g_variant_builder_end (&builder_setting));
/* All VPN requests get sent to the VPN's auth dialog, since it knows better /* All VPN requests get sent to the VPN's auth dialog, since it knows better
* than the agent about what secrets are required. Otherwise, if no secrets * than the agent about what secrets are required. Otherwise, if no secrets