Merge of r4644:
Fixed potential null pointer dereference in ngx_resolver_create(). While here, improved error message.
This commit is contained in:
parent
da29cd1feb
commit
1dec0cfafb
1 changed files with 6 additions and 1 deletions
|
@ -175,7 +175,12 @@ ngx_resolver_create(ngx_conf_t *cf, ngx_str_t *names, ngx_uint_t n)
|
|||
u.port = 53;
|
||||
|
||||
if (ngx_inet_resolve_host(cf->pool, &u) != NGX_OK) {
|
||||
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, "%V: %s", &u.host, u.err);
|
||||
if (u.err) {
|
||||
ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
|
||||
"%s in resolver \"%V\"",
|
||||
u.err, &u.host);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue