aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-12-27 19:31:13 (GMT)
committerJouni Malinen <j@w1.fi>2009-12-27 19:31:13 (GMT)
commitf7c478337957d4a669cce2675ba7749d7318c518 (patch)
tree11be3e98d2385b1f478ebcd6706bb1c513d17873 /src/ap
parentf78feb6a7268584a88b2dfd384e31e320b887e10 (diff)
downloadhostap-f7c478337957d4a669cce2675ba7749d7318c518.zip
hostap-f7c478337957d4a669cce2675ba7749d7318c518.tar.gz
hostap-f7c478337957d4a669cce2675ba7749d7318c518.tar.bz2
Split hostapd_interface_deinit() into deinit and free parts
This allows the driver interface to be deinitialized before struct hostapd_data instance gets freed. This needs to be done so that the driver wrapper does not maintain a context pointer to freed memory.
Diffstat (limited to 'src/ap')
-rw-r--r--src/ap/hostapd.c6
-rw-r--r--src/ap/hostapd.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/ap/hostapd.c b/src/ap/hostapd.c
index 492c6a5..158c9b6 100644
--- a/src/ap/hostapd.c
+++ b/src/ap/hostapd.c
@@ -822,6 +822,12 @@ void hostapd_interface_deinit(struct hostapd_iface *iface)
hostapd_flush_old_stations(hapd);
hostapd_cleanup(hapd);
}
+}
+
+
+void hostapd_interface_free(struct hostapd_iface *iface)
+{
+ size_t j;
for (j = 0; j < iface->num_bss; j++)
os_free(iface->bss[j]);
hostapd_cleanup_iface(iface);
diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
index 27ac984..f3cbad2 100644
--- a/src/ap/hostapd.h
+++ b/src/ap/hostapd.h
@@ -243,6 +243,7 @@ hostapd_alloc_bss_data(struct hostapd_iface *hapd_iface,
int hostapd_setup_interface(struct hostapd_iface *iface);
int hostapd_setup_interface_complete(struct hostapd_iface *iface, int err);
void hostapd_interface_deinit(struct hostapd_iface *iface);
+void hostapd_interface_free(struct hostapd_iface *iface);
void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta,
int reassoc);