From 7b5776834b0190fd13b08592c8fcdc32177bbdc4 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 8 Aug 2008 19:30:58 +0300 Subject: [PATCH] Fixed a NULL pointer dereference when driver initialization fails --- hostapd/hostapd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hostapd/hostapd.c b/hostapd/hostapd.c index f0437fd3d..e9d964760 100644 --- a/hostapd/hostapd.c +++ b/hostapd/hostapd.c @@ -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);