mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-01 03:34:32 +02:00
Merge branch 'fix/https_server_mem_leak_for_error_ret' into 'master'
Fix/https server mem leak for error ret Closes IDFGH-4300 See merge request espressif/esp-idf!11369
This commit is contained in:
@@ -175,6 +175,7 @@ static httpd_ssl_ctx_t *create_secure_context(const struct httpd_ssl_config *con
|
||||
if (!cfg->cacert_buf) {
|
||||
ESP_LOGE(TAG, "Could not allocate memory");
|
||||
free(cfg);
|
||||
free(ssl_ctx);
|
||||
return NULL;
|
||||
}
|
||||
memcpy((char *)cfg->cacert_buf, config->client_verify_cert_pem, config->client_verify_cert_len);
|
||||
@@ -186,6 +187,7 @@ static httpd_ssl_ctx_t *create_secure_context(const struct httpd_ssl_config *con
|
||||
ESP_LOGE(TAG, "Could not allocate memory");
|
||||
free((void *)cfg->cacert_buf);
|
||||
free(cfg);
|
||||
free(ssl_ctx);
|
||||
return NULL;
|
||||
}
|
||||
memcpy((char *)cfg->servercert_buf, config->cacert_pem, config->cacert_len);
|
||||
@@ -197,6 +199,7 @@ static httpd_ssl_ctx_t *create_secure_context(const struct httpd_ssl_config *con
|
||||
free((void *)cfg->servercert_buf);
|
||||
free((void *)cfg->cacert_buf);
|
||||
free(cfg);
|
||||
free(ssl_ctx);
|
||||
return NULL;
|
||||
}
|
||||
memcpy((char *)cfg->serverkey_buf, config->prvtkey_pem, config->prvtkey_len);
|
||||
|
@@ -117,7 +117,7 @@ def efuse_summary(args):
|
||||
|
||||
|
||||
def efuse_burn_key(args):
|
||||
os.system("python $IDF_PATH/components/esptool_py/esptool/espefuse.py --chip esp32s2 -p %s burn_key"
|
||||
os.system("python $IDF_PATH/components/esptool_py/esptool/espefuse.py --chip esp32s2 -p %s burn_key "
|
||||
"%s %s HMAC_DOWN_DIGITAL_SIGNATURE --no-read-protect"
|
||||
% ((args.port), ("BLOCK_KEY" + str(args.efuse_key_id)), (hmac_key_file)))
|
||||
|
||||
|
Reference in New Issue
Block a user