[nginx] Core: properly initialized written bytes counter in memo...

Valentin Bartenev vbart at nginx.com
Tue May 19 16:27:38 UTC 2015


details:   http://hg.nginx.org/nginx/rev/2c21bfe3da89
branches:  
changeset: 6149:2c21bfe3da89
user:      Valentin Bartenev <vbart at nginx.com>
date:      Tue May 19 19:27:07 2015 +0300
description:
Core: properly initialized written bytes counter in memory log.

diffstat:

 src/core/ngx_log.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r bf8b6534db3a -r 2c21bfe3da89 src/core/ngx_log.c
--- a/src/core/ngx_log.c	Mon May 18 16:05:44 2015 +0300
+++ b/src/core/ngx_log.c	Tue May 19 19:27:07 2015 +0300
@@ -609,7 +609,7 @@ ngx_log_set_log(ngx_conf_t *cf, ngx_log_
             return NGX_CONF_ERROR;
         }
 
-        buf = ngx_palloc(cf->pool, sizeof(ngx_log_memory_buf_t));
+        buf = ngx_pcalloc(cf->pool, sizeof(ngx_log_memory_buf_t));
         if (buf == NULL) {
             return NGX_CONF_ERROR;
         }



More information about the nginx-devel mailing list