Welcome! Log In Create A New Profile

Advanced

[nginx] Sub filter: fixed allocation alignment.

Roman Arutyunyan
March 28, 2016 06:38AM
details: http://hg.nginx.org/nginx/rev/088ef087a011
branches:
changeset: 6464:088ef087a011
user: Roman Arutyunyan <arut@nginx.com>
date: Mon Mar 28 13:35:25 2016 +0300
description:
Sub filter: fixed allocation alignment.

diffstat:

src/http/modules/ngx_http_sub_filter_module.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)

diffs (39 lines):

diff -r 5df5d7d771f6 -r 088ef087a011 src/http/modules/ngx_http_sub_filter_module.c
--- a/src/http/modules/ngx_http_sub_filter_module.c Fri Feb 26 17:30:27 2016 -0800
+++ b/src/http/modules/ngx_http_sub_filter_module.c Mon Mar 28 13:35:25 2016 +0300
@@ -229,7 +229,7 @@ ngx_http_sub_header_filter(ngx_http_requ
return ngx_http_next_header_filter(r);
}

- ctx->matches = ngx_pnalloc(r->pool, sizeof(ngx_array_t));
+ ctx->matches = ngx_palloc(r->pool, sizeof(ngx_array_t));
if (ctx->matches == NULL) {
return NGX_ERROR;
}
@@ -237,7 +237,7 @@ ngx_http_sub_header_filter(ngx_http_requ
ctx->matches->elts = matches;
ctx->matches->nelts = j;

- ctx->tables = ngx_pnalloc(r->pool, sizeof(ngx_http_sub_tables_t));
+ ctx->tables = ngx_palloc(r->pool, sizeof(ngx_http_sub_tables_t));
if (ctx->tables == NULL) {
return NGX_ERROR;
}
@@ -859,7 +859,7 @@ ngx_http_sub_merge_conf(ngx_conf_t *cf,
pairs = conf->pairs->elts;
n = conf->pairs->nelts;

- matches = ngx_pnalloc(cf->pool, sizeof(ngx_http_sub_match_t) * n);
+ matches = ngx_palloc(cf->pool, sizeof(ngx_http_sub_match_t) * n);
if (matches == NULL) {
return NGX_CONF_ERROR;
}
@@ -869,7 +869,7 @@ ngx_http_sub_merge_conf(ngx_conf_t *cf,
matches[i].value = &pairs[i].value;
}

- conf->matches = ngx_pnalloc(cf->pool, sizeof(ngx_array_t));
+ conf->matches = ngx_palloc(cf->pool, sizeof(ngx_array_t));
if (conf->matches == NULL) {
return NGX_CONF_ERROR;
}

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Sub filter: fixed allocation alignment.

Roman Arutyunyan 325 March 28, 2016 06:38AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 144
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready