Skip to content

Commit

Permalink
Fixed build of stream module
Browse files Browse the repository at this point in the history
  • Loading branch information
defanator committed Oct 11, 2018
1 parent 80659b1 commit 9db8253
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ngx_stream_geoip2_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,15 +196,15 @@ 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;
}
ngx_memcpy(v->data, (u_char *) entry_data.utf8_string, v->len);
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;
}
Expand Down

0 comments on commit 9db8253

Please sign in to comment.