-
Notifications
You must be signed in to change notification settings - Fork 7.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(esp_http_client): Do not allocate client->if_name twice in esp_http_client_init. (IDFGH-12994) #13945
Conversation
When if_name is specified in config and CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS is set, client->if_name is allocated twice, and first one is never free.
👋 Hello fbp2m, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
sha=f80749b2bf600bb0d2c99b2b1ed0c7190a1c838a |
Do not allocate client->if_name twice in esp_http_client_init(). Signed-off-by: Harshit Malpani <[email protected]> Closes #13945
Do not allocate client->if_name twice in esp_http_client_init(). Signed-off-by: Harshit Malpani <[email protected]> Closes #13945
Do not allocate client->if_name twice in esp_http_client_init(). Signed-off-by: Harshit Malpani <[email protected]> Closes #13945
Do not allocate client->if_name twice in esp_http_client_init(). Signed-off-by: Harshit Malpani <[email protected]> Closes #13945
When if_name is specified in esp_http_client_config_t like this :
and CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS is set.
"client->if_name" is allocated twice because "init_common_tcp_transport" is called twice.
First allocation is never free.