Mercurial > hg > nginx
comparison src/http/modules/ngx_http_gzip_filter_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 | da46bfc484ef |
children | ab5117642647 |
comparison
equal
deleted
inserted
replaced
6972:6e8c249b34ea | 6973:99934aade555 |
---|---|
642 ngx_buf_t *b; | 642 ngx_buf_t *b; |
643 ngx_chain_t *cl; | 643 ngx_chain_t *cl; |
644 static u_char gzheader[10] = | 644 static u_char gzheader[10] = |
645 { 0x1f, 0x8b, Z_DEFLATED, 0, 0, 0, 0, 0, 0, 3 }; | 645 { 0x1f, 0x8b, Z_DEFLATED, 0, 0, 0, 0, 0, 0, 3 }; |
646 | 646 |
647 b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t)); | 647 b = ngx_calloc_buf(r->pool); |
648 if (b == NULL) { | 648 if (b == NULL) { |
649 return NGX_ERROR; | 649 return NGX_ERROR; |
650 } | 650 } |
651 | 651 |
652 b->memory = 1; | 652 b->memory = 1; |