nl80211: Add forgotten deinit code on failure path
This commit is contained in:
parent
278ef89f3f
commit
2397086869
1 changed files with 3 additions and 0 deletions
|
@ -5517,6 +5517,8 @@ static void *i802_init(struct hostapd_data *hapd,
|
||||||
|
|
||||||
failed:
|
failed:
|
||||||
nl80211_remove_monitor_interface(drv);
|
nl80211_remove_monitor_interface(drv);
|
||||||
|
rfkill_deinit(drv->rfkill);
|
||||||
|
netlink_deinit(drv->netlink);
|
||||||
if (drv->ioctl_sock >= 0)
|
if (drv->ioctl_sock >= 0)
|
||||||
close(drv->ioctl_sock);
|
close(drv->ioctl_sock);
|
||||||
|
|
||||||
|
@ -5524,6 +5526,7 @@ failed:
|
||||||
nl_cache_free(drv->nl_cache);
|
nl_cache_free(drv->nl_cache);
|
||||||
nl80211_handle_destroy(drv->nl_handle);
|
nl80211_handle_destroy(drv->nl_handle);
|
||||||
nl_cb_put(drv->nl_cb);
|
nl_cb_put(drv->nl_cb);
|
||||||
|
eloop_unregister_read_sock(nl_socket_get_fd(drv->nl_handle_event));
|
||||||
|
|
||||||
os_free(drv);
|
os_free(drv);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in a new issue