diff --git a/src/x509_str.c b/src/x509_str.c index 28c428ed365..81c43b7b45d 100644 --- a/src/x509_str.c +++ b/src/x509_str.c @@ -514,7 +514,7 @@ int wolfSSL_X509_verify_cert(WOLFSSL_X509_STORE_CTX* ctx) failedCerts = wolfSSL_sk_X509_new_null(); if (!failedCerts) - return WOLFSSL_FATAL_ERROR; + goto exit; if (ctx->depth > 0) { depth = ctx->depth + 1;