wired: Fix deinit path to unregister eloop read_sock
The previous version was leaving behind registered eloop socket instances. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
44ac019c96
commit
01b24c52df
1 changed files with 6 additions and 2 deletions
|
@ -374,11 +374,15 @@ static void wired_driver_hapd_deinit(void *priv)
|
|||
{
|
||||
struct wpa_driver_wired_data *drv = priv;
|
||||
|
||||
if (drv->sock >= 0)
|
||||
if (drv->sock >= 0) {
|
||||
eloop_unregister_read_sock(drv->sock);
|
||||
close(drv->sock);
|
||||
}
|
||||
|
||||
if (drv->dhcp_sock >= 0)
|
||||
if (drv->dhcp_sock >= 0) {
|
||||
eloop_unregister_read_sock(drv->dhcp_sock);
|
||||
close(drv->dhcp_sock);
|
||||
}
|
||||
|
||||
os_free(drv);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue