mirror of https://github.com/wolfSSL/wolfssl.git
Need to free x509 in tests
parent
a738c16b2f
commit
8cba5dda17
|
@ -46003,6 +46003,9 @@ int wolfSSL_PEM_write_bio_X509(WOLFSSL_BIO *bio, WOLFSSL_X509 *cert)
|
|||
/* write the PEM to BIO */
|
||||
ret = wolfSSL_BIO_write(bio, pem, pemSz);
|
||||
XFREE(pem, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
#ifdef WOLFSSL_SMALL_STACK
|
||||
XFREE(der, NULL, DYNAMIC_TYPE_TMP_BUFFER);
|
||||
#endif
|
||||
|
||||
if (ret <= 0) return WOLFSSL_FAILURE;
|
||||
return WOLFSSL_SUCCESS;
|
||||
|
|
|
@ -37659,6 +37659,7 @@ static void test_wolfSSL_PEM_write_bio_X509(void)
|
|||
#endif
|
||||
AssertIntEQ(wolfSSL_BIO_get_len(output), expectedLen);
|
||||
|
||||
X509_free(x509);
|
||||
BIO_free(input);
|
||||
BIO_free(output);
|
||||
|
||||
|
|
Loading…
Reference in New Issue