Skip to content

Commit fa5e3f0

Browse files
authored
Merge pull request #339 from u5surf/fix_dump_dangling_pointer
Fix initialize vtsn->stat_status_code_counter
2 parents 625fc9c + ee1e501 commit fa5e3f0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/ngx_http_vhost_traffic_status_dump.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,10 @@ ngx_http_vhost_traffic_status_dump_restore_add_node(ngx_event_t *ev,
300300

301301
*vtsn = *ovtsn;
302302

303+
/* invalidate pointers serialized from the old process */
304+
vtsn->stat_status_code_counter = NULL;
305+
vtsn->stat_status_code_length = 0;
306+
303307
ngx_memcpy(vtsn->data, key->data, key->len);
304308

305309
ngx_rbtree_insert(ctx->rbtree, node);

0 commit comments

Comments
 (0)