Do not call hapd_deinit if driver was not initialized

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Shan Palanisamy 2012-02-16 19:42:29 +02:00 committed by Jouni Malinen
parent 31b79e1197
commit c0971c561f

View file

@ -315,7 +315,7 @@ static void hostapd_interface_deinit_free(struct hostapd_iface *iface)
driver = iface->bss[0]->driver;
drv_priv = iface->bss[0]->drv_priv;
hostapd_interface_deinit(iface);
if (driver && driver->hapd_deinit)
if (driver && driver->hapd_deinit && drv_priv)
driver->hapd_deinit(drv_priv);
hostapd_interface_free(iface);
}