comparison src/http/modules/ngx_http_static_module.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 a72886067bbb
children 0cdee26605f3
comparison
equal deleted inserted replaced
6972:6e8c249b34ea 6973:99934aade555
231 231
232 r->allow_ranges = 1; 232 r->allow_ranges = 1;
233 233
234 /* we need to allocate all before the header would be sent */ 234 /* we need to allocate all before the header would be sent */
235 235
236 b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); 236 b = ngx_calloc_buf(r->pool);
237 if (b == NULL) { 237 if (b == NULL) {
238 return NGX_HTTP_INTERNAL_SERVER_ERROR; 238 return NGX_HTTP_INTERNAL_SERVER_ERROR;
239 } 239 }
240 240
241 b->file = ngx_pcalloc(r->pool, sizeof(ngx_file_t)); 241 b->file = ngx_pcalloc(r->pool, sizeof(ngx_file_t));