diff --git a/src/node_crypto.cc b/src/node_crypto.cc index dcb0d38c47d346..3fd71012351583 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -770,9 +770,8 @@ void SecureContext::AddCRL(const FunctionCallbackInfo& args) { PEM_read_bio_X509_CRL(bio, nullptr, CryptoPemCallback, nullptr); if (crl == nullptr) { - return env->ThrowError("Failed to parse CRL"); BIO_free_all(bio); - return; + return env->ThrowError("Failed to parse CRL"); } X509_STORE* cert_store = SSL_CTX_get_cert_store(sc->ctx_);