diff options
Diffstat (limited to 'libnm-core/nm-utils.c')
| -rw-r--r-- | libnm-core/nm-utils.c | 4 |
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)) |