mirror of
https://github.com/nginx/nginx.git
synced 2024-12-18 21:23:36 -06:00
Resolver: fixed allocation error handling while resolving SRV.
This commit is contained in:
parent
6a4a1f0e23
commit
b0b24e8a30
@ -443,7 +443,7 @@ ngx_resolve_name(ngx_resolver_ctx_t *ctx)
|
||||
|
||||
name.data = ngx_resolver_alloc(r, name.len);
|
||||
if (name.data == NULL) {
|
||||
return NGX_ERROR;
|
||||
goto failed;
|
||||
}
|
||||
|
||||
if (slen == ctx->service.len) {
|
||||
@ -481,6 +481,8 @@ ngx_resolve_name(ngx_resolver_ctx_t *ctx)
|
||||
ngx_resolver_free(r, ctx->event);
|
||||
}
|
||||
|
||||
failed:
|
||||
|
||||
ngx_resolver_free(r, ctx);
|
||||
|
||||
return NGX_ERROR;
|
||||
|
Loading…
Reference in New Issue
Block a user