From: Marcel Raad Date: Sun, 16 Feb 2025 20:52:52 +0000 (+0100) Subject: openssl: remove bad `goto`s into other scope X-Git-Tag: curl-8_13_0~450 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d164f495208bee0dc3ac4c15c11ffc89fe7e4fd2;p=thirdparty%2Fcurl.git openssl: remove bad `goto`s into other scope All the `goto` did in these cases was effectively `return 0`, so just use that explicitly. Closes https://github.com/curl/curl/pull/16356 --- diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index 3e49a95534..d5f55d7c46 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -1452,7 +1452,7 @@ int cert_stuff(struct Curl_easy *data, failf(data, "No cert found in the openssl store: %s", ossl_strerror(ERR_get_error(), error_buffer, sizeof(error_buffer))); - goto fail; + return 0; } if(SSL_CTX_use_certificate(ctx, cert) != 1) { @@ -1728,7 +1728,7 @@ fail: failf(data, "No private key found in the openssl store: %s", ossl_strerror(ERR_get_error(), error_buffer, sizeof(error_buffer))); - goto fail; + return 0; } if(SSL_CTX_use_PrivateKey(ctx, priv_key) != 1) {