mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 11:17:29 +02:00
in error case close FILE
This commit is contained in:
@ -22168,9 +22168,11 @@ void* wolfSSL_GetRsaDecCtx(WOLFSSL* ssl)
|
|||||||
return SSL_BAD_FILE;
|
return SSL_BAD_FILE;
|
||||||
|
|
||||||
if (wolfSSL_BIO_set_fp(b, fp, BIO_CLOSE) != SSL_SUCCESS) {
|
if (wolfSSL_BIO_set_fp(b, fp, BIO_CLOSE) != SSL_SUCCESS) {
|
||||||
|
XFCLOSE(fp);
|
||||||
return SSL_BAD_FILE;
|
return SSL_BAD_FILE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* file is closed when bio is free'd */
|
||||||
return SSL_SUCCESS;
|
return SSL_SUCCESS;
|
||||||
#else
|
#else
|
||||||
(void)name;
|
(void)name;
|
||||||
@ -22600,6 +22602,7 @@ WOLFSSL_BIO *wolfSSL_BIO_new_file(const char *filename, const char *mode)
|
|||||||
bio = NULL;
|
bio = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* file is closed when BIO is free'd */
|
||||||
return bio;
|
return bio;
|
||||||
#else
|
#else
|
||||||
(void)filename;
|
(void)filename;
|
||||||
|
Reference in New Issue
Block a user