Resolver: fixed allocation error handling while resolving SRV.
This commit is contained in:
parent
e6ac1b7f6b
commit
4f3956f62d
|
@ -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