mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-01 19:54:32 +02:00
change(esp_wifi): Remove direct call of malloc() and free()
This commit is contained in:
@@ -166,7 +166,7 @@ static inline int wpa_auth_set_key(struct wpa_authenticator *wpa_auth,
|
|||||||
if (alg == WIFI_WPA_ALG_IGTK) {
|
if (alg == WIFI_WPA_ALG_IGTK) {
|
||||||
if (key) {
|
if (key) {
|
||||||
wpa_printf (MSG_DEBUG, "%s : igtk idx %d", __func__, idx);
|
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) {
|
if (igtk != NULL) {
|
||||||
memcpy(&igtk->igtk[0], key, WPA_IGTK_LEN);
|
memcpy(&igtk->igtk[0], key, WPA_IGTK_LEN);
|
||||||
|
Reference in New Issue
Block a user