diff --git a/native/com_wolfssl_WolfSSLX509StoreCtx.c b/native/com_wolfssl_WolfSSLX509StoreCtx.c index dcd45fd6..6f9cefe7 100644 --- a/native/com_wolfssl_WolfSSLX509StoreCtx.c +++ b/native/com_wolfssl_WolfSSLX509StoreCtx.c @@ -97,7 +97,7 @@ JNIEXPORT jobjectArray JNICALL Java_com_wolfssl_WolfSSLX509StoreCtx_X509_1STORE_ (*jenv)->DeleteLocalRef(jenv, derArr); } } - wolfSSL_sk_X509_free(sk); + wolfSSL_sk_X509_pop_free(sk, NULL); (*jenv)->DeleteLocalRef(jenv, arrType);