atheros: Release sock_raw and reset appfilter on hapd_init failure
Signed-hostap: Baruch Siach <baruch@tkos.co.il>
This commit is contained in:
parent
3dfd0484fc
commit
50d405ec87
1 changed files with 5 additions and 1 deletions
|
@ -1688,13 +1688,17 @@ atheros_init(struct hostapd_data *hapd, struct wpa_init_params *params)
|
||||||
linux_set_iface_flags(drv->ioctl_sock, drv->iface, 0);
|
linux_set_iface_flags(drv->ioctl_sock, drv->iface, 0);
|
||||||
atheros_set_privacy(drv, 0); /* default to no privacy */
|
atheros_set_privacy(drv, 0); /* default to no privacy */
|
||||||
|
|
||||||
atheros_receive_pkt(drv);
|
if (atheros_receive_pkt(drv))
|
||||||
|
goto bad;
|
||||||
|
|
||||||
if (atheros_wireless_event_init(drv))
|
if (atheros_wireless_event_init(drv))
|
||||||
goto bad;
|
goto bad;
|
||||||
|
|
||||||
return drv;
|
return drv;
|
||||||
bad:
|
bad:
|
||||||
|
atheros_reset_appfilter(drv);
|
||||||
|
if (drv->sock_raw)
|
||||||
|
l2_packet_deinit(drv->sock_raw);
|
||||||
if (drv->sock_recv != NULL && drv->sock_recv != drv->sock_xmit)
|
if (drv->sock_recv != NULL && drv->sock_recv != drv->sock_xmit)
|
||||||
l2_packet_deinit(drv->sock_recv);
|
l2_packet_deinit(drv->sock_recv);
|
||||||
if (drv->sock_xmit != NULL)
|
if (drv->sock_xmit != NULL)
|
||||||
|
|
Loading…
Reference in a new issue