diff --git a/src/x509_str.c b/src/x509_str.c index d5849ad75..a38f93b20 100644 --- a/src/x509_str.c +++ b/src/x509_str.c @@ -557,6 +557,7 @@ WOLFSSL_STACK* wolfSSL_X509_STORE_CTX_get_chain(WOLFSSL_X509_STORE_CTX* ctx) } } else { + wolfSSL_X509_free(x509); WOLFSSL_MSG("Could not find CA for certificate"); } }