Split hostapd_cleanup_iface() into two parts

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Shan Palanisamy 2012-02-16 19:47:54 +02:00 committed by Jouni Malinen
parent ed53dec023
commit 4b8a59e40e

View file

@ -295,6 +295,18 @@ static void hostapd_cleanup_iface_pre(struct hostapd_iface *iface)
} }
static void hostapd_cleanup_iface_partial(struct hostapd_iface *iface)
{
hostapd_free_hw_features(iface->hw_features, iface->num_hw_features);
iface->hw_features = NULL;
os_free(iface->current_rates);
iface->current_rates = NULL;
os_free(iface->basic_rates);
iface->basic_rates = NULL;
ap_list_deinit(iface);
}
/** /**
* hostapd_cleanup_iface - Complete per-interface cleanup * hostapd_cleanup_iface - Complete per-interface cleanup
* @iface: Pointer to interface data * @iface: Pointer to interface data
@ -304,13 +316,7 @@ static void hostapd_cleanup_iface_pre(struct hostapd_iface *iface)
*/ */
static void hostapd_cleanup_iface(struct hostapd_iface *iface) static void hostapd_cleanup_iface(struct hostapd_iface *iface)
{ {
hostapd_free_hw_features(iface->hw_features, iface->num_hw_features); hostapd_cleanup_iface_partial(iface);
iface->hw_features = NULL;
os_free(iface->current_rates);
iface->current_rates = NULL;
os_free(iface->basic_rates);
iface->basic_rates = NULL;
ap_list_deinit(iface);
hostapd_config_free(iface->conf); hostapd_config_free(iface->conf);
iface->conf = NULL; iface->conf = NULL;