Skip to content

Commit ad3ad56

Browse files
authored
Merge pull request #9871 from JacobBarthelmeh/f296
fix to free x509 struct in error case with wolfSSL_PKCS7_get0_signers
2 parents 9010544 + 13ebc5b commit ad3ad56

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)