diff --git a/src/node_crypto.cc b/src/node_crypto.cc index d970420a6e..4d93dd4cb0 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_);