aboutsummaryrefslogtreecommitdiff
path: root/src/stream/ngx_stream_upstream_zone_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stream/ngx_stream_upstream_zone_module.c')
-rw-r--r--src/stream/ngx_stream_upstream_zone_module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stream/ngx_stream_upstream_zone_module.c b/src/stream/ngx_stream_upstream_zone_module.c
index 4f72188f6..80d42fa00 100644
--- a/src/stream/ngx_stream_upstream_zone_module.c
+++ b/src/stream/ngx_stream_upstream_zone_module.c
@@ -278,7 +278,7 @@ ngx_stream_upstream_zone_copy_peer(ngx_stream_upstream_rr_peers_t *peers,
dst->server.data = NULL;
}
- dst->sockaddr = ngx_slab_calloc_locked(pool, NGX_SOCKADDRLEN);
+ dst->sockaddr = ngx_slab_calloc_locked(pool, sizeof(ngx_sockaddr_t));
if (dst->sockaddr == NULL) {
goto failed;
}