]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: fcgi-app: use pool_alloc(), not pool_alloc_dirty()
authorWilly Tarreau <w@1wt.eu>
Mon, 22 Mar 2021 14:07:37 +0000 (15:07 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 22 Mar 2021 14:35:53 +0000 (15:35 +0100)
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.

src/fcgi-app.c

index 1a25406378a05eea1f8c8b8da0c66378f519ec2e..a7f3842b6c465eb16474584f3d335f5a52c24d2e 100644 (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;
                }