Merge branch 'bugfix/malloc_free_removal_v5.1' into 'release/v5.1'

change(esp_wifi): Remove direct call of malloc() and free() (v5.1)

See merge request espressif/esp-idf!24932
This commit is contained in:
Jiang Jiang Jian 2023-08-01 10:53:10 +08:00
commit 5dfbd1eb8d

View File

@ -166,7 +166,7 @@ static inline int wpa_auth_set_key(struct wpa_authenticator *wpa_auth,
if (alg == WIFI_WPA_ALG_IGTK) {
if (key) {
wpa_printf (MSG_DEBUG, "%s : igtk idx %d", __func__, idx);
wifi_wpa_igtk_t *igtk = malloc(sizeof(wifi_wpa_igtk_t));
wifi_wpa_igtk_t *igtk = os_malloc(sizeof(wifi_wpa_igtk_t));
if (igtk != NULL) {
memcpy(&igtk->igtk[0], key, WPA_IGTK_LEN);