From: Willy Tarreau Date: Mon, 22 Mar 2021 14:07:37 +0000 (+0100) Subject: MINOR: fcgi-app: use pool_alloc(), not pool_alloc_dirty() X-Git-Tag: v2.4-dev14~71 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18f43d85a0d95ec7cad1a2ac5e8097ffbc891454;p=thirdparty%2Fhaproxy.git MINOR: fcgi-app: use pool_alloc(), not pool_alloc_dirty() pool_alloc_dirty() is the version below pool_alloc() that never performs the memory poisonning. It should only be called directly for very large unstructured areas for which enabling memory poisonning would not bring anything but could significantly hurt performance (e.g. buffers). Using this function here will not provide any benefit and will hurt the ability to debug. It would be desirable to backport this, although it does not cause any user-visible bug, it just complicates debugging. --- diff --git a/src/fcgi-app.c b/src/fcgi-app.c index 1a25406378..a7f3842b6c 100644 --- a/src/fcgi-app.c +++ b/src/fcgi-app.c @@ -289,7 +289,7 @@ static int fcgi_flt_start(struct stream *s, struct filter *filter) struct fcgi_flt_conf *fcgi_conf = FLT_CONF(filter); struct fcgi_flt_ctx *fcgi_ctx; - fcgi_ctx = pool_alloc_dirty(pool_head_fcgi_flt_ctx); + fcgi_ctx = pool_alloc(pool_head_fcgi_flt_ctx); if (fcgi_ctx == NULL) { // FIXME: send a warning return 0; @@ -398,7 +398,7 @@ static int fcgi_flt_http_headers(struct stream *s, struct filter *filter, struct ebpt_delete(node); } else { - param_rule = pool_alloc_dirty(pool_head_fcgi_param_rule); + param_rule = pool_alloc(pool_head_fcgi_param_rule); if (param_rule == NULL) goto param_rule_err; } @@ -428,7 +428,7 @@ static int fcgi_flt_http_headers(struct stream *s, struct filter *filter, struct ebpt_delete(node); } else { - hdr_rule = pool_alloc_dirty(pool_head_fcgi_hdr_rule); + hdr_rule = pool_alloc(pool_head_fcgi_hdr_rule); if (hdr_rule == NULL) goto hdr_rule_err; }