From ca789e09b53420dbc24ababec1ab44c88618f6d6 Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Wed, 8 Oct 2025 14:44:23 +0200 Subject: [PATCH] wolfssl: no double get_error() detail Code was calling wolfSSL_get_error() on code that it had already retrieved with the same function. Remove that. Reported-by: Joshua Rogers Closes #18940 --- lib/vtls/wolfssl.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/vtls/wolfssl.c b/lib/vtls/wolfssl.c index 6186ce985b..d4a0e066fa 100644 --- a/lib/vtls/wolfssl.c +++ b/lib/vtls/wolfssl.c @@ -1632,11 +1632,10 @@ static CURLcode wssl_send_earlydata(struct Curl_cfilter *cf, break; default: { char error_buffer[256]; - int detail = wolfSSL_get_error(wssl->ssl, err); CURL_TRC_CF(data, cf, "SSL send early data, error: '%s'(%d)", wssl_strerror((unsigned long)err, error_buffer, sizeof(error_buffer)), - detail); + err); result = CURLE_SEND_ERROR; break; } @@ -1878,7 +1877,6 @@ static CURLcode wssl_shutdown(struct Curl_cfilter *cf, char error_buffer[256]; int nread = -1, err; size_t i; - int detail; DEBUGASSERT(wctx); if(!wctx->ssl || cf->shutdown) { @@ -1959,11 +1957,10 @@ static CURLcode wssl_shutdown(struct Curl_cfilter *cf, connssl->io_need = CURL_SSL_IO_NEED_SEND; break; default: - detail = wolfSSL_get_error(wctx->ssl, err); CURL_TRC_CF(data, cf, "SSL shutdown, error: '%s'(%d)", wssl_strerror((unsigned long)err, error_buffer, sizeof(error_buffer)), - detail); + err); result = CURLE_RECV_ERROR; break; } -- 2.47.3