mirror of
https://github.com/nginx/nginx.git
synced 2024-11-27 23:49:00 +08:00
use ngx_resolver_alloc() instead of ngx_resolver_calloc()
since all fields are filled
This commit is contained in:
parent
e79f429b4b
commit
653edd491b
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user