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.
This commit is contained in:
Willy Tarreau 2021-03-22 15:07:37 +01:00
parent f1a91292dc
commit 18f43d85a0

View File

@ -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;
}