Browse Source

Do not call hapd_deinit if driver was not initialized

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Shan Palanisamy 13 years ago
parent
commit
c0971c561f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      hostapd/main.c

+ 1 - 1
hostapd/main.c

@@ -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);
 }