From 687d7ca1cb63229f34674e1eb6cc91b143459999 Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Mon, 18 Mar 2024 14:44:02 -0600 Subject: [PATCH] JNI/JSSE: call wolfSSL_sk_X509_pop_free() instead of wolfSSL_sk_X509_free() in WolfSSLX509StoreCtx.getDerCerts() --- native/com_wolfssl_WolfSSLX509StoreCtx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);