Skip to content

Commit 473a736

Browse files
authored
allocate from fake connection pool
1 parent 51b3daf commit 473a736

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/ngx_http_lua_ssl_client_helloby.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -728,11 +728,6 @@ int ngx_http_lua_ffi_ssl_get_client_hello_ciphers(ngx_http_request_t *r,
728728
return NGX_ERROR;
729729
}
730730

731-
c = ngx_ssl_get_connection(ssl_conn);
732-
if (c == NULL) {
733-
*err = "couldn't get real ngx_connection_t pointer";
734-
return NGX_ERROR;
735-
}
736731

737732
#ifdef SSL_ERROR_WANT_CLIENT_HELLO_CB
738733
ciphersuites_bytes = SSL_client_hello_get0_ciphers(ssl_conn, &ciphers_raw);
@@ -749,7 +744,7 @@ int ngx_http_lua_ffi_ssl_get_client_hello_ciphers(ngx_http_request_t *r,
749744

750745
*ciphers_cnt = ciphersuites_bytes / 2;
751746

752-
*ciphers = ngx_palloc(c->pool, sizeof(short) * (*ciphers_cnt));
747+
*ciphers = ngx_palloc(r->connection->pool, sizeof(short) * (*ciphers_cnt));
753748
if (*ciphers == NULL) {
754749
*err = "ngx_palloc() failed for the ciphers array";
755750
return NGX_ERROR;

0 commit comments

Comments
 (0)