comparison src/core/ngx_log.c @ 6149:2c21bfe3da89

Core: properly initialized written bytes counter in memory log.
author Valentin Bartenev <vbart@nginx.com>
date Tue, 19 May 2015 19:27:07 +0300
parents 61d7ae76647d
children 2cd019520210
comparison
equal deleted inserted replaced
6148:bf8b6534db3a 6149:2c21bfe3da89
607 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, 607 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
608 "invalid buffer size \"%V\"", &value[1]); 608 "invalid buffer size \"%V\"", &value[1]);
609 return NGX_CONF_ERROR; 609 return NGX_CONF_ERROR;
610 } 610 }
611 611
612 buf = ngx_palloc(cf->pool, sizeof(ngx_log_memory_buf_t)); 612 buf = ngx_pcalloc(cf->pool, sizeof(ngx_log_memory_buf_t));
613 if (buf == NULL) { 613 if (buf == NULL) {
614 return NGX_CONF_ERROR; 614 return NGX_CONF_ERROR;
615 } 615 }
616 616
617 buf->start = ngx_pnalloc(cf->pool, size); 617 buf->start = ngx_pnalloc(cf->pool, size);