Skip to content

Commit

Permalink
histograms were not properly initialized which could lead to segfaults
Browse files Browse the repository at this point in the history
  • Loading branch information
lyokha committed May 27, 2020
1 parent 1a9cb15 commit 252cc7e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ngx_http_custom_counters_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -1082,6 +1082,8 @@ ngx_http_cnt_counter_set_init(ngx_conf_t *cf, ngx_http_cnt_main_conf_t *mcf,
return NGX_ERROR;
}

ngx_memzero(&cnt_set->histograms, sizeof(ngx_array_t));

shm_data = ngx_palloc(cf->pool, sizeof(ngx_http_cnt_shm_data_t));
if (shm_data == NULL) {
return NGX_ERROR;
Expand Down

0 comments on commit 252cc7e

Please sign in to comment.