fix(wpa3): fix memleak

This commit is contained in:
Zhang Jun Hao
2020-06-16 10:40:07 +08:00
parent 068901a8a7
commit fe02028ee1
3 changed files with 16 additions and 0 deletions

View File

@ -144,6 +144,11 @@ void ICACHE_FLASH_ATTR wpa_sta_init()
wpa_config_assoc_ie, wpa_install_key, wpa_get_key, wpa_deauthenticate, wpa_neg_complete);
}
void wpa_sta_deinit(void)
{
wpa_sm_deinit();
}
void wpa_sta_connect(uint8_t *bssid)
{
wpa_config_profile();

View File

@ -2009,6 +2009,15 @@ void ICACHE_FLASH_ATTR wpa_register(char* payload, WPA_SEND_FUNC snd_func,
return true;
}
/**
* * wpa_sm_deinit - Deinitialize WPA state machine
* */
void wpa_sm_deinit(void)
{
struct wpa_sm *sm = &gWpaSm;
pmksa_cache_deinit(sm->pmksa);
}
void wpa_set_profile(u32 wpa_proto, u8 auth_mode)
{
struct wpa_sm *sm = &gWpaSm;

View File

@ -163,6 +163,8 @@ void wpa_register(char * payload, WPA_SEND_FUNC snd_func, \
void eapol_txcb(void *eb);
void wpa_sm_deinit(void);
void wpa_set_profile(u32 wpa_proto, u8 auth_mode);
int wpa_set_bss(char *macddr, char * bssid, u8 pairwise_cipher, u8 group_cipher, char *passphrase, u8 *ssid, size_t ssid_len);