Sub filter: fixed initialization in http{} level (ticket #791).

If sub_filter directive was only specified at http{} level, sub filter
internal data remained uninitialized.  That would lead to a crash in runtime.
This commit is contained in:
Roman Arutyunyan 2015-09-21 23:08:34 +03:00
parent ee37ff613f
commit f64ff24451

View File

@ -853,8 +853,9 @@ ngx_http_sub_merge_conf(ngx_conf_t *cf, void *parent, void *child)
conf->pairs = prev->pairs; conf->pairs = prev->pairs;
conf->matches = prev->matches; conf->matches = prev->matches;
conf->tables = prev->tables; conf->tables = prev->tables;
}
} else if (conf->dynamic == 0){ if (conf->pairs && conf->dynamic == 0 && conf->tables == NULL) {
pairs = conf->pairs->elts; pairs = conf->pairs->elts;
n = conf->pairs->nelts; n = conf->pairs->nelts;