[PATCH 2/5] wpa_supplicant.c: it's possible for an interface to be defined with a driver

Roy Marples roy
Tue May 26 14:25:15 PDT 2009


Signed-off-by: Roy Marples <roy at marples.name>
---
 wpa_supplicant/wpa_supplicant.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/wpa_supplicant/wpa_supplicant.c b/wpa_supplicant/wpa_supplicant.c
index 8cb3d8a..4c6c248 100644
--- a/wpa_supplicant/wpa_supplicant.c
+++ b/wpa_supplicant/wpa_supplicant.c
@@ -1849,7 +1849,10 @@ next_driver:
 	wpa_s->drv_priv = wpa_drv_init(wpa_s, wpa_s->ifname);
 	if (wpa_s->drv_priv == NULL) {
 		const char *pos;
-		pos = os_strchr(driver, ',');
+		if (driver)
+			pos = os_strchr(driver, ',');
+		else
+			pos = NULL;
 		if (pos) {
 			wpa_printf(MSG_DEBUG, "Failed to initialize driver "
 				   "interface - try next driver wrapper");
-- 
1.6.2.5




More information about the Hostap mailing list