Fixed NULL pointer dereference on error path [Bug 273]

This commit is contained in:
Jouni Malinen 2008-07-18 05:57:03 +03:00
parent 6652b61cd4
commit b0f23e11ed

View 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;