From: Willy Tarreau Date: Mon, 22 Mar 2021 14:05:54 +0000 (+0100) Subject: MINOR: spoe: use pool_alloc(), not pool_alloc_dirty() X-Git-Tag: v2.4-dev14~72 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f1a91292dc05a251a1ba9fa0f3f96b919b253df1;p=thirdparty%2Fhaproxy.git MINOR: spoe: 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 real benefit, it only avoids the area being poisonned before being zeroed. Ideally a pool_calloc() function should be provided for this. --- diff --git a/src/flt_spoe.c b/src/flt_spoe.c index 654f2699c5..0397470778 100644 --- a/src/flt_spoe.c +++ b/src/flt_spoe.c @@ -1965,7 +1965,7 @@ spoe_create_appctx(struct spoe_config *conf) if ((appctx = appctx_new(&spoe_applet, tid_bit)) == NULL) goto out_error; - appctx->ctx.spoe.ptr = pool_alloc_dirty(pool_head_spoe_appctx); + appctx->ctx.spoe.ptr = pool_alloc(pool_head_spoe_appctx); if (SPOE_APPCTX(appctx) == NULL) goto out_free_appctx; memset(appctx->ctx.spoe.ptr, 0, pool_head_spoe_appctx->size); @@ -2870,7 +2870,7 @@ spoe_create_context(struct stream *s, struct filter *filter) struct spoe_config *conf = FLT_CONF(filter); struct spoe_context *ctx; - ctx = pool_alloc_dirty(pool_head_spoe_ctx); + ctx = pool_alloc(pool_head_spoe_ctx); if (ctx == NULL) { return NULL; }