From ac1114b7644ab0f4b1001e968ac38d6c32f83862 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Sat, 22 Sep 2018 12:15:49 +0200 Subject: [PATCH] crypto: remove unnecessary usage of goto The control flow can easily be refactored to use break instead of goto. --- src/node_crypto.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 4cf3ac5652bc0d..fa1ef5c81702e1 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -590,7 +590,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 @@ -617,12 +617,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) {