Klaus Demo nginx / 2d3fff0
Merge of r4497: Fixed null pointer dereference in resolver (ticket #91). The cycle->new_log.file may not be set before config parsing finished if there are no error_log directive defined at global level. Fix is to copy it after config parsing. Patch by Roman Arutyunyan. Maxim Dounin 8 years ago
1 changed file(s) with 6 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
151151 uc->sockaddr = addr->sockaddr;
152152 uc->socklen = addr->socklen;
153153 uc->server = addr->name;
154
155 uc->log = cf->cycle->new_log;
156 uc->log.handler = ngx_resolver_log_error;
157 uc->log.data = uc;
158 uc->log.action = "resolving";
159154 }
160155
161156 return r;
829824 uc = r->udp_connection;
830825
831826 if (uc->connection == NULL) {
827
828 uc->log = *r->log;
829 uc->log.handler = ngx_resolver_log_error;
830 uc->log.data = uc;
831 uc->log.action = "resolving";
832
832833 if (ngx_udp_connect(uc) != NGX_OK) {
833834 return NGX_ERROR;
834835 }