From 9db8253eec68eb65de853424b2d4c9efdb5ca2d2 Mon Sep 17 00:00:00 2001 From: Andrei Belov Date: Thu, 11 Oct 2018 19:22:52 +0300 Subject: [PATCH] Fixed build of stream module --- ngx_stream_geoip2_module.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ngx_stream_geoip2_module.c b/ngx_stream_geoip2_module.c index ad97ac6..650dcfa 100644 --- a/ngx_stream_geoip2_module.c +++ b/ngx_stream_geoip2_module.c @@ -196,7 +196,7 @@ ngx_stream_geoip2_variable(ngx_stream_session_t *s, ngx_stream_variable_value_t break; case MMDB_DATA_TYPE_UTF8_STRING: v->len = entry_data.data_size; - v->data = ngx_pnalloc(r->pool, v->len); + v->data = ngx_pnalloc(s->connection->pool, v->len); if (v->data == NULL) { return NGX_ERROR; } @@ -204,7 +204,7 @@ ngx_stream_geoip2_variable(ngx_stream_session_t *s, ngx_stream_variable_value_t break; case MMDB_DATA_TYPE_BYTES: v->len = entry_data.data_size; - v->data = ngx_pnalloc(r->pool, v->len); + v->data = ngx_pnalloc(s->connection->pool, v->len); if (v->data == NULL) { return NGX_ERROR; }