create empty radix tree for "geo $geo { }" case
This commit is contained in:
parent
80563412b8
commit
8013eba125
|
@ -255,6 +255,13 @@ ngx_http_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
|||
}
|
||||
|
||||
} else {
|
||||
if (ctx.tree == NULL) {
|
||||
ctx.tree = ngx_radix_tree_create(cf->pool, -1);
|
||||
if (ctx.tree == NULL) {
|
||||
return NGX_CONF_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
var->get_handler = ngx_http_geo_cidr_variable;
|
||||
var->data = (uintptr_t) ctx.tree;
|
||||
|
||||
|
|
Loading…
Reference in New Issue