Skip to content

Commit cf57ab5

Browse files
avidadenji
authored andcommitted
use SSL_free to free openssl data
1 parent 38d4042 commit cf57ab5

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

ngx_http_upstream_check_module.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,7 +1270,7 @@ ngx_http_upstream_check_connect_handler(ngx_event_t *event) {
12701270
c->sendfile = 0;
12711271
c->read->log = c->log;
12721272
c->write->log = c->log;
1273-
c->pool = ngx_create_pool(ngx_pagesize, ngx_cycle->log);
1273+
c->pool = ngx_create_pool(NGX_CYCLE_POOL_SIZE, ngx_cycle->log);
12741274
#if (NGX_HTTP_SSL)
12751275
if (is_https_check_type && rc == NGX_AGAIN) {
12761276
c->write->handler = ngx_http_upstream_do_ssl_handshake;
@@ -1299,10 +1299,7 @@ static void free_SSL_data(ngx_http_upstream_check_peer_t *peer) {
12991299
ngx_connection_t *c = peer->pc.connection;
13001300
if (is_https_check(peer) &&
13011301
c->ssl) {
1302-
ngx_ssl_free_buffer(c);
1303-
c->ssl->no_wait_shutdown = 1;
1304-
c->ssl->no_send_shutdown = 1;
1305-
ngx_ssl_shutdown(c);
1302+
SSL_free(c->ssl->connection);
13061303
c->ssl = NULL;
13071304
}
13081305
}
@@ -1315,7 +1312,7 @@ static void ngx_http_upstream_do_ssl_handshake(ngx_event_t *event) {
13151312
c = event->data;
13161313
peer = c -> data;
13171314
ucscf = peer->conf;
1318-
rc = ngx_ssl_create_connection(&ucscf->ssl, c, NGX_SSL_CLIENT);
1315+
rc = ngx_ssl_create_connection(&ucscf->ssl, c, NGX_SSL_BUFFER|NGX_SSL_CLIENT);
13191316
if (rc != NGX_OK) {
13201317
return;
13211318
}

0 commit comments

Comments
 (0)