From b0f23e11edb7eb3483429c7e141be57425bf4dcf Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 18 Jul 2008 05:57:03 +0300 Subject: [PATCH] Fixed NULL pointer dereference on error path [Bug 273] --- hostapd/driver_madwifi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hostapd/driver_madwifi.c b/hostapd/driver_madwifi.c index 9c3ebff..1dd12ea 100644 --- a/hostapd/driver_madwifi.c +++ b/hostapd/driver_madwifi.c @@ -1204,7 +1204,7 @@ madwifi_init(struct hostapd_data *hapd) drv = os_zalloc(sizeof(struct madwifi_driver_data)); if (drv == NULL) { printf("Could not allocate memory for madwifi driver data\n"); - goto bad; + return NULL; } drv->hapd = hapd; -- 2.1.4