Parcourir la source

Fixed NULL pointer dereference on error path [Bug 273]

Jouni Malinen il y a 16 ans
Parent
commit
b0f23e11ed
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      hostapd/driver_madwifi.c

+ 1 - 1
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;