mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 18:57:27 +02:00
add free of bio in error case
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user