diff --git a/src/node_crypto.cc b/src/node_crypto.cc index 7e351d6b75499c..c5f5871617c222 100644 --- a/src/node_crypto.cc +++ b/src/node_crypto.cc @@ -787,9 +787,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_);