From f1a91292dc05a251a1ba9fa0f3f96b919b253df1 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Mon, 22 Mar 2021 15:05:54 +0100 Subject: [PATCH] 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. --- src/flt_spoe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flt_spoe.c b/src/flt_spoe.c index 654f2699c..039747077 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; }