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.
This commit is contained in:
Willy Tarreau 2021-03-22 15:05:54 +01:00
parent 5bfeb2139b
commit f1a91292dc

View File

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