Skip to content

Commit a9ba179

Browse files
authored
fix build: ngx_str_t::len may be used uninitialized in this function
1 parent c833ae5 commit a9ba179

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ngx_dynamic_upstream_op.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ equals(PeerT *peer, ngx_str_t server, ngx_str_t name)
184184
static ngx_str_t
185185
ngx_str_shm(ngx_slab_pool_t *shpool, ngx_str_t *s)
186186
{
187-
ngx_str_t sh;
187+
ngx_str_t sh = ngx_null_string;
188188
sh.data = ngx_shm_calloc<u_char>(shpool, s->len);
189189
if (sh.data != NULL) {
190190
ngx_memcpy(sh.data, s->data, s->len);

0 commit comments

Comments
 (0)