From 13ebc5b9bf54eeb99cfed005a6c1291fc198db1a Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Wed, 4 Mar 2026 15:59:56 -0700 Subject: [PATCH] fix to free x509 struct in error case with wolfSSL_PKCS7_get0_signers --- src/ssl_p7p12.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ssl_p7p12.c b/src/ssl_p7p12.c index 32799176aa7..ee48d700aa2 100644 --- a/src/ssl_p7p12.c +++ b/src/ssl_p7p12.c @@ -292,6 +292,7 @@ WOLFSSL_STACK* wolfSSL_PKCS7_get0_signers(PKCS7* pkcs7, WOLFSSL_STACK* certs, } if (wolfSSL_sk_X509_push(signers, x509) <= 0) { + wolfSSL_X509_free(x509); wolfSSL_sk_X509_pop_free(signers, NULL); return NULL; }