summary refs log tree commit diff
path: root/libnm-core/nm-utils.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2017-02-16 00:00:34 +0100
committerMichael Biebl <biebl@debian.org>2017-02-16 00:00:34 +0100
commita222e56e103f949b148a6942e385ccca2c26d9f3 (patch)
tree7978165f4d291224c854adb4c96c863a924b4882 /libnm-core/nm-utils.c
parent7f4dff3943c64e1d0e5d13b2ac915088dde165e6 (diff)
New upstream version 1.6.2 upstream/1.6.2
Diffstat (limited to 'libnm-core/nm-utils.c')
-rw-r--r--libnm-core/nm-utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c
index 5b4566bf..478a548d 100644
--- a/libnm-core/nm-utils.c
+++ b/libnm-core/nm-utils.c
@@ -819,6 +819,8 @@ _nm_utils_slist_to_strv (GSList *slist, gboolean deep_copy)
 	int len, i;
 
 	len = g_slist_length (slist);
+	if (!len)
+		return NULL;
 	strv = g_new (char *, len + 1);
 
 	if (deep_copy) {
@@ -1068,7 +1070,7 @@ nm_utils_security_valid (NMUtilsSecurityType type,
 	case NMU_SEC_LEAP: /* require PRIVACY bit for LEAP? */
 		if (adhoc)
 			return FALSE;
-		/* Fall through */
+		/* fall through */
 	case NMU_SEC_STATIC_WEP:
 		g_assert (have_ap);
 		if (!(ap_flags & NM_802_11_AP_FLAGS_PRIVACY))