diff options
Diffstat (limited to 'src/http/ngx_http_log_handler.c')
| -rw-r--r-- | src/http/ngx_http_log_handler.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/http/ngx_http_log_handler.c b/src/http/ngx_http_log_handler.c index 581a1ce65..fd373444e 100644 --- a/src/http/ngx_http_log_handler.c +++ b/src/http/ngx_http_log_handler.c @@ -166,7 +166,10 @@ ngx_int_t ngx_http_log_handler(ngx_http_request_t *r) len++; #endif - ngx_test_null(line, ngx_palloc(r->pool, len), NGX_ERROR); + if (!(line = ngx_palloc(r->pool, len))) { + return NGX_ERROR; + } + p = line; for (i = 0; i < log[l].ops->nelts; i++) { |
