Fixed NULL pointer dereference on error path [Bug 273]
authorJouni Malinen <j@w1.fi>
Fri, 18 Jul 2008 02:57:03 +0000 (05:57 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 18 Jul 2008 02:57:03 +0000 (05:57 +0300)
hostapd/driver_madwifi.c

index 9c3ebff..1dd12ea 100644 (file)
@@ -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;