mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-15 20:45:32 +00:00
libnm-core: fix crash in nm_vpn_plugin_info_list_get_service_types()
Coverity says, "Dereference after null check". Indeed, @aliases
is usually NULL.
Fixes: 46665898bb
This commit is contained in:
parent
8bae6e588f
commit
9cf9c3a88e
|
@ -738,7 +738,7 @@ nm_vpn_plugin_info_list_get_service_types (GSList *list,
|
|||
n = _service_type_get_default_abbreviation (priv->service);
|
||||
if (n)
|
||||
g_ptr_array_add (l, g_strdup (n));
|
||||
for (i = 0; priv->aliases[i]; i++) {
|
||||
for (i = 0; priv->aliases && priv->aliases[i]; i++) {
|
||||
n = _service_type_get_default_abbreviation (priv->aliases[i]);
|
||||
if (n)
|
||||
g_ptr_array_add (l, g_strdup (n));
|
||||
|
|
Loading…
Reference in a new issue