summaryrefslogtreecommitdiff
path: root/libnm-core/nm-utils-private.h
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-03-22 09:26:54 +0100
committerThomas Haller <thaller@redhat.com>2019-03-24 09:21:14 +0100
commit2a93ce91227eff1ecfad9eae671ac0291d8c244e (patch)
treec077eaba41f16a6db3bc6d33feebdc1766d87030 /libnm-core/nm-utils-private.h
parent5478853a0b25fa33df10ca254b99c7cb493745d3 (diff)
downloadNetworkManager-2a93ce91227eff1ecfad9eae671ac0291d8c244e.tar.gz
libnm/team: preserve unset priv->runner_tx_hash in _align_team_properties()th/libnm-team-fixes
There is a difference between an unset JSON array element and an empty one. Don't loose that information.
Diffstat (limited to 'libnm-core/nm-utils-private.h')
-rw-r--r--libnm-core/nm-utils-private.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/libnm-core/nm-utils-private.h b/libnm-core/nm-utils-private.h
index 19e140851c..f730d3d365 100644
--- a/libnm-core/nm-utils-private.h
+++ b/libnm-core/nm-utils-private.h
@@ -179,7 +179,8 @@ _nm_utils_json_extract_strv (char *conf,
if ( !t_value
|| !G_TYPE_CHECK_VALUE_TYPE (t_value, G_TYPE_STRV))
return NULL;
- return g_strdupv (g_value_get_boxed (t_value));
+ return g_strdupv (g_value_get_boxed (t_value))
+ ?: g_new0 (char *, 1);
}
static inline GPtrArray *