mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
7c4d3fbf8b
When setting hostname using esp_netif_set_hostname_api() failed for some reason, the netif pointer might be freed while lwip pointer stil point to that location and could be used. Fixed by moving the freeing and string duplication to the block where lwip hostname is set. Closes https://github.com/espressif/esp-idf/issues/6048