mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-31 15:32:37 +01:00
network: Don't free known networks in network_info_put
Fix a double free resulting from network.c freeing a known network when it goes out of range due to a missing check.
This commit is contained in:
parent
2cd8480feb
commit
215162a49e
@ -292,8 +292,8 @@ static void network_info_put(struct network_info *network)
|
||||
if (!networks)
|
||||
return;
|
||||
|
||||
l_queue_remove(networks, network);
|
||||
network_info_free(network);
|
||||
if (l_queue_remove(networks, network))
|
||||
network_info_free(network);
|
||||
}
|
||||
|
||||
struct network *network_create(struct device *device, const char *ssid,
|
||||
|
Loading…
Reference in New Issue
Block a user