summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2016-04-22 16:52:14 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2016-04-22 16:57:02 +0200
commit7434e6a77bc00d881097e594ebd773b4bd09c75c (patch)
treeab077887686334c0d66d6fad28e5fc11e049cc93
parent3d505b3f87c9cb9bfdc9b9a1fc67f57330701d03 (diff)
downloadNetworkManager-7434e6a77bc00d881097e594ebd773b4bd09c75c.tar.gz
libnm-core: fix compiler warning in nm_vpn_plugin_info_get_auth_dialog()
libnm-core/nm-vpn-plugin-info.c: In function ‘nm_vpn_plugin_info_get_auth_dialog’: shared/gsystem-local-alloc.h:53:46: error: ‘prog_basename’ may be used uninitialized in this function [-Werror=maybe-uninitialized] Fixes: a3f94f451b910bbaf38a172f6bb9a2050a9553e5
-rw-r--r--libnm-core/nm-vpn-plugin-info.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libnm-core/nm-vpn-plugin-info.c b/libnm-core/nm-vpn-plugin-info.c
index 9ffa04706a..6fb91ab7ee 100644
--- a/libnm-core/nm-vpn-plugin-info.c
+++ b/libnm-core/nm-vpn-plugin-info.c
@@ -678,10 +678,9 @@ nm_vpn_plugin_info_get_auth_dialog (NMVpnPluginInfo *self)
else if (g_path_is_absolute (s))
priv->auth_dialog = g_strdup (s);
else {
- gs_free char *prog_basename;
-
/* for relative paths, we take the basename and assume it's in LIBEXECDIR. */
- prog_basename = g_path_get_basename (s);
+ gs_free char *prog_basename = g_path_get_basename (s);
+
priv->auth_dialog = g_build_filename (LIBEXECDIR, prog_basename, NULL);
}
}