mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-11 01:40:19 +01:00
libnm-glib: fix crash for AddAndActivateConnection() D-Bus call (bgo #652512)
When a partial connection is passed to nm_client_add_and_activate_connection(), but it doesn't contain any settings, nm_connection_to_hash() returns NULL and there's a crash later on the NULL hash.
This commit is contained in:
parent
6fe22d99f0
commit
b4a72d1ad7
1 changed files with 1 additions and 1 deletions
|
|
@ -763,7 +763,7 @@ nm_client_add_and_activate_connection (NMClient *client,
|
|||
|
||||
if (partial)
|
||||
hash = nm_connection_to_hash (partial, NM_SETTING_HASH_FLAG_ALL);
|
||||
else
|
||||
if (!hash)
|
||||
hash = g_hash_table_new (g_str_hash, g_str_equal);
|
||||
|
||||
priv = NM_CLIENT_GET_PRIVATE (client);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue