aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap
diff options
context:
space:
mode:
Diffstat (limited to 'src/ap')
-rw-r--r--src/ap/ap_config.c21
-rw-r--r--src/ap/ap_config.h1
2 files changed, 14 insertions, 8 deletions
diff --git a/src/ap/ap_config.c b/src/ap/ap_config.c
index c532bf0..3f5e58b 100644
--- a/src/ap/ap_config.c
+++ b/src/ap/ap_config.c
@@ -382,6 +382,18 @@ void hostapd_config_free_eap_user(struct hostapd_eap_user *user)
}
+void hostapd_config_free_eap_users(struct hostapd_eap_user *user)
+{
+ struct hostapd_eap_user *prev_user;
+
+ while (user) {
+ prev_user = user;
+ user = user->next;
+ hostapd_config_free_eap_user(prev_user);
+ }
+}
+
+
static void hostapd_config_free_wep(struct hostapd_wep_keys *keys)
{
int i;
@@ -434,8 +446,6 @@ static void hostapd_config_free_fils_realms(struct hostapd_bss_config *conf)
void hostapd_config_free_bss(struct hostapd_bss_config *conf)
{
- struct hostapd_eap_user *user, *prev_user;
-
if (conf == NULL)
return;
@@ -448,12 +458,7 @@ void hostapd_config_free_bss(struct hostapd_bss_config *conf)
os_free(conf->ssid.vlan_tagged_interface);
#endif /* CONFIG_FULL_DYNAMIC_VLAN */
- user = conf->eap_user;
- while (user) {
- prev_user = user;
- user = user->next;
- hostapd_config_free_eap_user(prev_user);
- }
+ hostapd_config_free_eap_users(conf->eap_user);
os_free(conf->eap_user_sqlite);
os_free(conf->eap_req_id_text);
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
index 69801d3..97ec0d4 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
@@ -732,6 +732,7 @@ int hostapd_mac_comp(const void *a, const void *b);
struct hostapd_config * hostapd_config_defaults(void);
void hostapd_config_defaults_bss(struct hostapd_bss_config *bss);
void hostapd_config_free_eap_user(struct hostapd_eap_user *user);
+void hostapd_config_free_eap_users(struct hostapd_eap_user *user);
void hostapd_config_clear_wpa_psk(struct hostapd_wpa_psk **p);
void hostapd_config_free_bss(struct hostapd_bss_config *conf);
void hostapd_config_free(struct hostapd_config *conf);