Merge branch 'fix/esp_tls_typo' into 'master'

Fix/esp_tls_mispaced_paranthesis

Closes IDF-2750 and IDF-2751

See merge request espressif/esp-idf!12295
This commit is contained in:
Mahavir Jain 2021-02-10 13:57:13 +08:00
commit e3d50e009a
2 changed files with 2 additions and 2 deletions

View File

@ -449,7 +449,7 @@ esp_err_t set_client_config(const char *hostname, size_t hostlen, esp_tls_cfg_t
if (cfg->alpn_protos) {
#ifdef CONFIG_MBEDTLS_SSL_ALPN
if ((ret = mbedtls_ssl_conf_alpn_protocols(&tls->conf, cfg->alpn_protos) != 0)) {
if ((ret = mbedtls_ssl_conf_alpn_protocols(&tls->conf, cfg->alpn_protos)) != 0) {
ESP_LOGE(TAG, "mbedtls_ssl_conf_alpn_protocols returned -0x%x", -ret);
ESP_INT_EVENT_TRACKER_CAPTURE(tls->error_handle, ESP_TLS_ERR_TYPE_MBEDTLS, -ret);
return ESP_ERR_MBEDTLS_SSL_CONF_ALPN_PROTOCOLS_FAILED;

View File

@ -378,7 +378,7 @@ static int protocomm_version_handler(uint32_t session_id,
/* Output is a non null terminated string with length specified */
*outlen = strlen(pc->ver);
*outbuf = malloc(*outlen);
if (outbuf == NULL) {
if (*outbuf == NULL) {
ESP_LOGE(TAG, "Failed to allocate memory for version response");
return ESP_ERR_NO_MEM;
}