diff options
Diffstat (limited to 'clients/cli/settings.c')
| -rw-r--r-- | clients/cli/settings.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/clients/cli/settings.c b/clients/cli/settings.c index 69275aad..01142ba2 100644 --- a/clients/cli/settings.c +++ b/clients/cli/settings.c @@ -313,16 +313,18 @@ _set_fcn_precheck_connection_secondaries (const char *value, { const GPtrArray *connections; NMConnection *con; + gs_free const char **strv0 = NULL; gs_strfreev char **strv = NULL; char **iter; - gboolean modified; + gboolean modified = FALSE; - strv = nmc_strsplit_set (value, " \t,", 0); - if (!strv) + strv0 = nm_utils_strsplit_set (value, " \t,"); + if (!strv0) return TRUE; connections = nm_client_get_connections (nm_cli.client); + strv = g_strdupv ((char **) strv0); for (iter = strv; *iter; iter++) { if (nm_utils_is_uuid (*iter)) { con = nmc_find_connection (connections, "uuid", *iter, NULL, FALSE); @@ -472,6 +474,7 @@ get_property_val (NMSetting *setting, const char *prop, NMMetaAccessorGetType ge get_type, show_secrets ? NM_META_ACCESSOR_GET_FLAGS_SHOW_SECRETS : 0, &out_flags, + NULL, (gpointer *) &to_free); nm_assert (!out_flags); return to_free ?: g_strdup (value); @@ -746,9 +749,9 @@ nmc_setting_get_property_desc (NMSetting *setting, const char *prop) return g_strdup_printf ("%s\n%s\n%s%s%s%s", setting_desc_title, - setting_desc ? setting_desc : "", + setting_desc ?: "", nmcli_nl, nmcli_desc_title, nmcli_nl, - nmcli_desc ? nmcli_desc : ""); + nmcli_desc ?: ""); } /* |