[gnome-software] snap: Fix compile warning
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] snap: Fix compile warning
- Date: Tue, 12 Feb 2019 03:20:59 +0000 (UTC)
commit d528ca6e2805dbfb8b132a005afdc39c7673c56d
Author: Robert Ancell <robert ancell canonical com>
Date: Tue Feb 12 16:09:35 2019 +1300
snap: Fix compile warning
plugins/snap/gs-plugin-snap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/snap/gs-plugin-snap.c b/plugins/snap/gs-plugin-snap.c
index 38da2b68..00d2e38b 100644
--- a/plugins/snap/gs-plugin-snap.c
+++ b/plugins/snap/gs-plugin-snap.c
@@ -160,7 +160,7 @@ load_auth (GsPlugin *plugin)
g_autofree gchar *macaroon = NULL;
g_autofree gchar *discharges_str = NULL;
g_autoptr(GVariant) discharges_var = NULL;
- g_autofree const gchar **discharges = NULL;
+ g_auto(GStrv) discharges = NULL;
g_autoptr(SnapdAuthData) auth_data = NULL;
g_autoptr(GError) error = NULL;
@@ -199,7 +199,7 @@ load_auth (GsPlugin *plugin)
discharges_str,
NULL, NULL, NULL);
if (discharges_var)
- discharges = g_variant_get_strv (discharges_var, NULL);
+ discharges = g_variant_dup_strv (discharges_var, NULL);
priv->auth_data = snapd_auth_data_new (macaroon, discharges);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]