[nginx] svn commit: r4692 - trunk/src/os/unix
mdounin at mdounin.ru
mdounin at mdounin.ru
Mon Jun 18 14:10:50 UTC 2012
Author: mdounin
Date: 2012-06-18 14:10:50 +0000 (Mon, 18 Jun 2012)
New Revision: 4692
URL: http://trac.nginx.org/nginx/changeset/4692/nginx
Log:
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.
Modified:
trunk/src/os/unix/ngx_process_cycle.c
Modified: trunk/src/os/unix/ngx_process_cycle.c
===================================================================
--- trunk/src/os/unix/ngx_process_cycle.c 2012-06-18 14:09:54 UTC (rev 4691)
+++ trunk/src/os/unix/ngx_process_cycle.c 2012-06-18 14:10:50 UTC (rev 4692)
@@ -711,6 +711,8 @@
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_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);
More information about the nginx-devel
mailing list