]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fixed a NULL pointer dereference when driver initialization fails
authorJouni Malinen <jouni.malinen@atheros.com>
Fri, 8 Aug 2008 16:30:58 +0000 (19:30 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 8 Aug 2008 16:30:58 +0000 (19:30 +0300)
hostapd/hostapd.c

index f0437fd3d5d3bb793fd8fe6565ac2affcee702ce..e9d9647604f47e88f7f8ad988a3b1b1808817207 100644 (file)
@@ -173,7 +173,7 @@ static void hostapd_deauth_all_stas(struct hostapd_data *hapd)
         * nothing works correctly, so let's skip sending this for the hostap
         * driver. */
 
-       if (os_strcmp(hapd->driver->name, "hostap") != 0) {
+       if (hapd->driver && os_strcmp(hapd->driver->name, "hostap") != 0) {
                os_memset(addr, 0xff, ETH_ALEN);
                hostapd_sta_deauth(hapd, addr,
                                   WLAN_REASON_PREV_AUTH_NOT_VALID);