add free of bio in error case

This commit is contained in:
Jacob Barthelmeh
2021-03-25 22:41:34 +07:00
parent 4ead19e21f
commit 9ea60db80a

View File

@ -26575,8 +26575,12 @@ WOLFSSL_API int wolfSSL_X509_load_crl_file(WOLFSSL_X509_LOOKUP *ctx,
WOLFSSL_ENTER("wolfSSL_X509_load_crl_file");
bio = wolfSSL_BIO_new(wolfSSL_BIO_s_file());
if (bio == NULL) {
return ret;
}
if ((bio == NULL) || (wolfSSL_BIO_read_filename(bio, file) <= 0)) {
if (wolfSSL_BIO_read_filename(bio, file) <= 0) {
wolfSSL_BIO_free(bio);
return ret;
}