mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-30 19:00:11 +01:00
wifi/iwd: in manager's interface_added() ensure known-network ID is not wrongly destroyed
Calling g_hash_table_insert() with a key which is already hashed will destroy the *new* key. Since @id is used below, that would be use after free. Fixes: d635caf940551f8f5b52683b8379a1f81c58f8fc
This commit is contained in:
parent
2c8161868e
commit
be875fe382
1 changed files with 1 additions and 1 deletions
|
|
@ -494,7 +494,7 @@ interface_added (GDBusObjectManager *object_manager, GDBusObject *object,
|
|||
|
||||
data = g_slice_new0 (KnownNetworkData);
|
||||
data->known_network = (GDBusProxy *) g_object_ref (proxy);
|
||||
g_hash_table_insert (priv->known_networks, id, data);
|
||||
g_hash_table_replace (priv->known_networks, id, data);
|
||||
|
||||
if (security == NM_IWD_NETWORK_SECURITY_8021X)
|
||||
mirror_8021x_connection (self, id, data);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue