comparison src/http/ngx_http_file_cache.c @ 6973:99934aade555

Use ngx_calloc_buf() where appropriate.
author Ruslan Ermilov <ru@nginx.com>
date Wed, 12 Apr 2017 22:21:04 +0300
parents 1aeaae6e9446
children ab199f0eb8e8
comparison
equal deleted inserted replaced
6972:6e8c249b34ea 6973:99934aade555
1575 return ngx_http_send_header(r); 1575 return ngx_http_send_header(r);
1576 } 1576 }
1577 1577
1578 /* we need to allocate all before the header would be sent */ 1578 /* we need to allocate all before the header would be sent */
1579 1579
1580 b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); 1580 b = ngx_calloc_buf(r->pool);
1581 if (b == NULL) { 1581 if (b == NULL) {
1582 return NGX_HTTP_INTERNAL_SERVER_ERROR; 1582 return NGX_HTTP_INTERNAL_SERVER_ERROR;
1583 } 1583 }
1584 1584
1585 b->file = ngx_pcalloc(r->pool, sizeof(ngx_file_t)); 1585 b->file = ngx_pcalloc(r->pool, sizeof(ngx_file_t));