Commit b4a72d1a authored by Jiří Klimeš's avatar Jiří Klimeš

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.
parent 6fe22d99
......@@ -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);
if (!hash)
hash = g_hash_table_new (g_str_hash, g_str_equal);
priv = NM_CLIENT_GET_PRIVATE (client);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment