if ((appctx = appctx_new(&spoe_applet, tid_bit)) == NULL)
goto out_error;
- appctx->ctx.spoe.ptr = pool_alloc(pool_head_spoe_appctx);
+ appctx->ctx.spoe.ptr = pool_zalloc(pool_head_spoe_appctx);
if (SPOE_APPCTX(appctx) == NULL)
goto out_free_appctx;
- memset(appctx->ctx.spoe.ptr, 0, pool_head_spoe_appctx->size);
appctx->st0 = SPOE_APPCTX_ST_CONNECT;
if ((SPOE_APPCTX(appctx)->task = task_new(tid_bit)) == NULL)
struct spoe_config *conf = FLT_CONF(filter);
struct spoe_context *ctx;
- ctx = pool_alloc(pool_head_spoe_ctx);
+ ctx = pool_zalloc(pool_head_spoe_ctx);
if (ctx == NULL) {
return NULL;
}
- memset(ctx, 0, sizeof(*ctx));
ctx->filter = filter;
ctx->state = SPOE_CTX_ST_NONE;
ctx->status_code = SPOE_CTX_ERR_NONE;