config: fix a potential NULL dereference

Coverity:
src/nm-config.c:598: var_deref_op: Dereferencing null pointer "groups".

(cherry picked from commit 421cf84343)
This commit is contained in:
Lubomir Rintel 2015-07-14 12:41:40 +02:00
parent 0885e561b3
commit 57b4de25ea

View file

@ -595,7 +595,7 @@ read_config (GKeyFile *keyfile, const char *path, GError **error)
NULL);
}
for (g = 0; groups[g]; g++) {
for (g = 0; groups && groups[g]; g++) {
const char *group = groups[g];
keys = g_key_file_get_keys (kf, group, &nkeys, NULL);