use ngx_resolver_alloc() instead of ngx_resolver_calloc()

since all fields are filled
This commit is contained in:
Igor Sysoev 2009-11-11 14:29:20 +00:00
parent e79f429b4b
commit 653edd491b

View File

@ -1728,7 +1728,7 @@ ngx_resolver_create_name_query(ngx_resolver_node_t *rn, ngx_resolver_ctx_t *ctx)
len = sizeof(ngx_resolver_query_t) + nlen + sizeof(ngx_resolver_qs_t);
p = ngx_resolver_calloc(ctx->resolver, len);
p = ngx_resolver_alloc(ctx->resolver, len);
if (p == NULL) {
return NGX_ERROR;
}
@ -1809,7 +1809,7 @@ ngx_resolver_create_addr_query(ngx_resolver_node_t *rn, ngx_resolver_ctx_t *ctx)
+ sizeof(".255.255.255.255.in-addr.arpa.") - 1
+ sizeof(ngx_resolver_qs_t);
p = ngx_resolver_calloc(ctx->resolver, len);
p = ngx_resolver_alloc(ctx->resolver, len);
if (p == NULL) {
return NGX_ERROR;
}