mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-07 13:08:10 +02:00
config: fix a potential NULL dereference
Coverity: src/nm-config.c:598: var_deref_op: Dereferencing null pointer "groups".
This commit is contained in:
parent
a418750f07
commit
421cf84343
1 changed files with 1 additions and 1 deletions
|
|
@ -633,7 +633,7 @@ read_config (GKeyFile *keyfile, const char *dirname, const char *path, GError **
|
||||||
* NMConfigData:_get_connection_infos(). */
|
* NMConfigData:_get_connection_infos(). */
|
||||||
_nm_config_sort_groups (groups, ngroups);
|
_nm_config_sort_groups (groups, ngroups);
|
||||||
|
|
||||||
for (g = 0; groups[g]; g++) {
|
for (g = 0; groups && groups[g]; g++) {
|
||||||
const char *group = groups[g];
|
const char *group = groups[g];
|
||||||
|
|
||||||
if (g_str_has_prefix (group, NM_CONFIG_KEYFILE_GROUPPREFIX_INTERN)) {
|
if (g_str_has_prefix (group, NM_CONFIG_KEYFILE_GROUPPREFIX_INTERN)) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue