Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28289)
(cherry picked from commit
f9afb3a07eb72428b98e3e31384380564a236700)
{
char *port = NULL;
BIO *in = NULL;
- BIO *ssl_bio, *tmp;
+ BIO *ssl_bio = NULL;
+ BIO *tmp;
SSL_CTX *ctx;
char buf[512];
int ret = EXIT_FAILURE, i;
* Basically it means the SSL BIO will be automatically setup
*/
BIO_set_accept_bios(in, ssl_bio);
+ ssl_bio = NULL;
/* Arrange to leave server loop on interrupt */
sigsetup();
if (ret != EXIT_SUCCESS)
ERR_print_errors_fp(stderr);
BIO_free(in);
+ BIO_free_all(ssl_bio);
return ret;
}
int main(int argc, char *argv[])
{
char *port = "*:4433";
- BIO *ssl_bio, *tmp;
+ BIO *ssl_bio = NULL;
+ BIO *tmp;
SSL_CTX *ctx;
SSL_CONF_CTX *cctx;
char buf[512];
* Basically it means the SSL BIO will be automatically setup
*/
BIO_set_accept_bios(in, ssl_bio);
+ ssl_bio = NULL;
again:
/*
if (ret != EXIT_SUCCESS)
ERR_print_errors_fp(stderr);
BIO_free(in);
+ BIO_free_all(ssl_bio);
return ret;
}
unsigned char buf[512];
char *port = "*:4433";
BIO *in = NULL;
- BIO *ssl_bio, *tmp;
+ BIO *ssl_bio = NULL;
+ BIO *tmp;
SSL_CTX *ctx;
int ret = EXIT_FAILURE, i;
* Basically it means the SSL BIO will be automatically setup
*/
BIO_set_accept_bios(in, ssl_bio);
+ ssl_bio = NULL;
again:
/*
if (ret != EXIT_SUCCESS)
ERR_print_errors_fp(stderr);
BIO_free(in);
+ BIO_free_all(ssl_bio);
return ret;
}
{
char *port = "*:4433";
BIO *in = NULL;
- BIO *ssl_bio, *tmp;
+ BIO *ssl_bio = NULL;
+ BIO *tmp;
SSL_CTX *ctx;
SSL_CONF_CTX *cctx = NULL;
CONF *conf = NULL;
* Basically it means the SSL BIO will be automatically setup
*/
BIO_set_accept_bios(in, ssl_bio);
+ ssl_bio = NULL;
again:
/*
if (ret != EXIT_SUCCESS)
ERR_print_errors_fp(stderr);
BIO_free(in);
+ BIO_free_all(ssl_bio);
return ret;
}