crypto: remove unnecessary usage of goto

The control flow can easily be refactored to use break instead of
goto.

PR-URL: https://github.com/nodejs/node/pull/23018
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
Tobias Nießen authored and Daniel Bevenius committed 2018-09-25 05:33:58 +02:00
1 parent b78ba93aae
commit 3eb2adbb8e
1 file changed
+1 -3
+1 -3
View File
@@ -591,7 +591,7 @@ int SSL_CTX_use_certificate_chain(SSL_CTX* ctx,
if (!r) {
ret = 0;
issuer = nullptr;
goto end;
break;
}
// Note that we must not free r if it was successfully
// added to the chain (while we must free the main
@@ -618,12 +618,10 @@ int SSL_CTX_use_certificate_chain(SSL_CTX* ctx,
issuer = X509_dup(issuer);
if (issuer == nullptr) {
ret = 0;
goto end;
}
}
}
end:
issuer_->reset(issuer);
if (ret && x != nullptr) {