fix(tcp_transport): Fix coverity report regarding tcp_transport

pull/13572/head
harshal.patil 2024-03-12 13:34:15 +05:30
rodzic 77ffead00a
commit b1586cc041
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 5B5EC97C35B9A2E5
1 zmienionych plików z 6 dodań i 3 usunięć

Wyświetl plik

@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2015-2023 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@ -111,8 +111,11 @@ static int ssl_connect(esp_transport_handle_t t, const char *host, int port, int
if (esp_tls_conn_new_sync(host, strlen(host), port, &ssl->cfg, ssl->tls) <= 0) {
ESP_LOGE(TAG, "Failed to open a new connection");
esp_tls_error_handle_t esp_tls_error_handle;
esp_tls_get_error_handle(ssl->tls, &esp_tls_error_handle);
esp_transport_set_errors(t, esp_tls_error_handle);
if (esp_tls_get_error_handle(ssl->tls, &esp_tls_error_handle) == ESP_OK) {
esp_transport_set_errors(t, esp_tls_error_handle);
} else {
ESP_LOGE(TAG, "Error in obtaining the error handle");
}
goto exit_failure;
}