mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-31 18:20:10 +01: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(cherry picked from commit9cf9c3a88e)
This commit is contained in:
parent
0536525d98
commit
4a535e6213
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Reference in a new issue