Mercurial > hg > nginx
comparison src/http/modules/ngx_http_gzip_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 | 5116cfea1e9a |
comparison
equal
deleted
inserted
replaced
6972:6e8c249b34ea | 6973:99934aade555 |
---|---|
246 ngx_str_set(&h->value, "gzip"); | 246 ngx_str_set(&h->value, "gzip"); |
247 r->headers_out.content_encoding = h; | 247 r->headers_out.content_encoding = h; |
248 | 248 |
249 /* we need to allocate all before the header would be sent */ | 249 /* we need to allocate all before the header would be sent */ |
250 | 250 |
251 b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); | 251 b = ngx_calloc_buf(r->pool); |
252 if (b == NULL) { | 252 if (b == NULL) { |
253 return NGX_HTTP_INTERNAL_SERVER_ERROR; | 253 return NGX_HTTP_INTERNAL_SERVER_ERROR; |
254 } | 254 } |
255 | 255 |
256 b->file = ngx_pcalloc(r->pool, sizeof(ngx_file_t)); | 256 b->file = ngx_pcalloc(r->pool, sizeof(ngx_file_t)); |