3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 17:59:25 +01:00

network: close settings prior to network removal

station_hide_network will remove and free the network object, so calling
network_close_settings will result in a crash.  Make sure this is done
prior to network object's destruction.

Fixes: 85d9d6461f ("network: Hide hidden networks on connection error")
This commit is contained in:
Denis Kenzior 2022-04-08 11:23:28 -05:00
parent c5f44f8d38
commit 867c68c05b

View File

@ -1248,10 +1248,10 @@ static void passphrase_callback(enum agent_result result,
return; return;
err: err:
network_settings_close(network);
if (network->provisioning_hidden) if (network->provisioning_hidden)
station_hide_network(station, network); station_hide_network(station, network);
network_settings_close(network);
} }
static struct l_dbus_message *network_connect_psk(struct network *network, static struct l_dbus_message *network_connect_psk(struct network *network,