]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
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 9c3ebff404041b311213f10a666b5f44c79195f3..1dd12eaf320e070369192a0c4afe66baf0a2f75f 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;