mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-28 19:34:59 +00:00
fix(esp_https_server): SSL context leak when HTTPS server fails to start
This commit is contained in:
committed by
Ashish Sharma
parent
72fa8b23b1
commit
fb2e8308fb
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2018-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2018-2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -429,8 +429,9 @@ esp_err_t httpd_ssl_start(httpd_handle_t *pHandle, struct httpd_ssl_config *conf
|
||||
|
||||
ret = httpd_start(&handle, &config->httpd);
|
||||
if (ret != ESP_OK) {
|
||||
free(ssl_ctx);
|
||||
ssl_ctx = NULL;
|
||||
if (ssl_ctx) {
|
||||
free_secure_context(ssl_ctx);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user