mirror of
https://github.com/nginx/nginx.git
synced 2024-12-03 04:39:00 +08:00
Fixed segfault with poll and resolver used.
Poll event method needs ngx_cycle->files to work, and use of ngx_exit_cycle without files set caused null pointer dereference in resolver's cleanup on udp socket close.
This commit is contained in:
parent
c45bd10b1c
commit
a769c530ff
@ -711,6 +711,8 @@ ngx_master_process_exit(ngx_cycle_t *cycle)
|
||||
ngx_exit_log.file = &ngx_exit_log_file;
|
||||
|
||||
ngx_exit_cycle.log = &ngx_exit_log;
|
||||
ngx_exit_cycle.files = ngx_cycle->files;
|
||||
ngx_exit_cycle.files_n = ngx_cycle->files_n;
|
||||
ngx_cycle = &ngx_exit_cycle;
|
||||
|
||||
ngx_destroy_pool(cycle->pool);
|
||||
@ -1054,6 +1056,8 @@ ngx_worker_process_exit(ngx_cycle_t *cycle)
|
||||
ngx_exit_log.file = &ngx_exit_log_file;
|
||||
|
||||
ngx_exit_cycle.log = &ngx_exit_log;
|
||||
ngx_exit_cycle.files = ngx_cycle->files;
|
||||
ngx_exit_cycle.files_n = ngx_cycle->files_n;
|
||||
ngx_cycle = &ngx_exit_cycle;
|
||||
|
||||
ngx_destroy_pool(cycle->pool);
|
||||
|
Loading…
Reference in New Issue
Block a user