Browse Source

Fixed NULL pointer dereference on error path [Bug 273]

Jouni Malinen 16 years ago
parent
commit
b0f23e11ed
1 changed files with 1 additions and 1 deletions
  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;