[nginx] Resolver: fixed allocation error handling while resolving SRV.
Roman Arutyunyan
arut at nginx.com
Mon Jun 19 11:30:50 UTC 2017
details: http://hg.nginx.org/nginx/rev/a39bc74873fa
branches:
changeset: 7039:a39bc74873fa
user: Bart Warmerdam <bartw at xs4all.nl>
date: Mon Jun 19 14:25:42 2017 +0300
description:
Resolver: fixed allocation error handling while resolving SRV.
diffstat:
src/core/ngx_resolver.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diffs (21 lines):
diff -r d1816a2696de -r a39bc74873fa src/core/ngx_resolver.c
--- a/src/core/ngx_resolver.c Fri Jun 16 18:15:58 2017 +0300
+++ b/src/core/ngx_resolver.c Mon Jun 19 14:25:42 2017 +0300
@@ -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;
More information about the nginx-devel
mailing list