Skip to content

Commit 13ebc5b

Browse files
fix to free x509 struct in error case with wolfSSL_PKCS7_get0_signers
1 parent 350706d commit 13ebc5b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/ssl_p7p12.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ WOLFSSL_STACK* wolfSSL_PKCS7_get0_signers(PKCS7* pkcs7, WOLFSSL_STACK* certs,
292292
}
293293

294294
if (wolfSSL_sk_X509_push(signers, x509) <= 0) {
295+
wolfSSL_X509_free(x509);
295296
wolfSSL_sk_X509_pop_free(signers, NULL);
296297
return NULL;
297298
}

0 commit comments

Comments
 (0)