mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
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:
parent
ee37ff613f
commit
f64ff24451
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user