diff --git a/src/core/ngx_resolver.c b/src/core/ngx_resolver.c index 645738ce5..42acc83f6 100644 --- a/src/core/ngx_resolver.c +++ b/src/core/ngx_resolver.c @@ -2722,8 +2722,7 @@ done: } if (len == -1) { - name->len = 0; - name->data = NULL; + ngx_str_null(name); return NGX_OK; }