This cleans up config.o from driver wrapper dependencies.
#include "config.h"
-extern struct wpa_driver_ops *wpa_drivers[];
-
-
static void hostapd_config_free_vlan(struct hostapd_bss_config *bss)
{
struct hostapd_vlan *vlan, *prev;
return NULL;
}
- /* set default driver based on configuration */
- conf->driver = wpa_drivers[0];
- if (conf->driver == NULL) {
- wpa_printf(MSG_ERROR, "No driver wrappers registered!");
- os_free(conf);
- os_free(bss);
- return NULL;
- }
-
bss->radius = os_zalloc(sizeof(*bss->radius));
if (bss->radius == NULL) {
os_free(conf);
fclose(f);
return NULL;
}
+
+ /* set default driver based on configuration */
+ conf->driver = wpa_drivers[0];
+ if (conf->driver == NULL) {
+ wpa_printf(MSG_ERROR, "No driver wrappers registered!");
+ hostapd_config_free(conf);
+ return NULL;
+ }
+
bss = conf->last_bss = conf->bss;
while (fgets(buf, sizeof(buf), f)) {