httpd_ssl_start potential memory leak (IDFGH-12519) #13526
Labels
Resolution: NA
Issue resolution is unavailable
Status: Done
Issue is done internally
Type: Bug
bugs in IDF
Answers checklist.
IDF version.
master
Espressif SoC revision.
ESP32
Operating System used.
Linux
How did you build your project?
CLion IDE
If you are using Windows, please specify command line type.
None
Development Kit.
ESP32-PICO-KIT
Power Supply used.
USB
What is the expected behavior?
When httpd_ssl_start() is invoked from a user application and an error occurs during httpd_start() within that function, all allocated memory of httpd_ssl_start should be freed to prevent memory leaks.
What is the actual behavior?
In
esp-idf/components/esp_https_server/src/https_server.c
Line 383 in be06a6f
esp-idf/components/esp_https_server/src/https_server.c
Line 413 in be06a6f
esp-idf/components/esp_https_server/src/https_server.c
Line 414 in be06a6f
esp-idf/components/esp_http_server/src/httpd_main.c
Line 478 in be06a6f
Steps to reproduce.
I haven't checked the issue on an ESP32 device but only with code review. However, calling httpd_ssl_start with config->max_open_sockets = CONFIG_LWIP_MAX_SOCKETS or config->max_open_sockets = 15, depending on the build, should trigger the memory leak.
Debug Logs.
No response
More Information.
On a first glance
esp-idf/components/esp_https_server/src/https_server.c
Line 388 in be06a6f
esp-idf/components/esp_https_server/src/https_server.c
Line 369 in be06a6f
The text was updated successfully, but these errors were encountered: