hostapd: Deinit ctrl_iface in case of add interface failure

Since the control interface is now initialized as part of
hostapd_setup_interface(), it needs to be deinitialized on the error
path.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2013-11-06 01:31:23 +02:00 committed by Jouni Malinen
parent 8540e0b520
commit 486d2ff0eb
1 changed files with 7 additions and 1 deletions

View File

@ -1806,8 +1806,14 @@ fail:
hostapd_config_free(conf);
if (hapd_iface) {
if (hapd_iface->bss) {
for (i = 0; i < hapd_iface->num_bss; i++)
for (i = 0; i < hapd_iface->num_bss; i++) {
hapd = hapd_iface->bss[i];
if (hapd && hapd_iface->interfaces &&
hapd_iface->interfaces->ctrl_iface_deinit)
hapd_iface->interfaces->
ctrl_iface_deinit(hapd);
os_free(hapd_iface->bss[i]);
}
os_free(hapd_iface->bss);
}
os_free(hapd_iface);