Fixed build of stream module

This commit is contained in:
Andrei Belov 2018-10-11 19:22:52 +03:00
parent 80659b1bee
commit 9db8253eec
No known key found for this signature in database
GPG key ID: 1465F6CF06C1F0CD

View file

@ -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;
}