diff src/http/modules/ngx_http_image_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 e4b00a021cea
children
line wrap: on
line diff
--- a/src/http/modules/ngx_http_image_filter_module.c
+++ b/src/http/modules/ngx_http_image_filter_module.c
@@ -581,7 +581,7 @@ ngx_http_image_json(ngx_http_request_t *
     size_t      len;
     ngx_buf_t  *b;
 
-    b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t));
+    b = ngx_calloc_buf(r->pool);
     if (b == NULL) {
         return NULL;
     }
@@ -633,7 +633,7 @@ ngx_http_image_asis(ngx_http_request_t *
 {
     ngx_buf_t  *b;
 
-    b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t));
+    b = ngx_calloc_buf(r->pool);
     if (b == NULL) {
         return NULL;
     }
@@ -1067,7 +1067,7 @@ transparent:
         return NULL;
     }
 
-    b = ngx_pcalloc(r->pool, sizeof(ngx_buf_t));
+    b = ngx_calloc_buf(r->pool);
     if (b == NULL) {
         gdFree(out);
         return NULL;