X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/blobdiff_plain/43f490c377cb05d1ac6e7d2c27a06ae940e2c047..a077a9a931a4b81abf0f549d7f463ae75075149a:/test/tvec-timeout.c diff --git a/test/tvec-timeout.c b/test/tvec-timeout.c index 778673e..e7b23b5 100644 --- a/test/tvec-timeout.c +++ b/test/tvec-timeout.c @@ -74,8 +74,10 @@ void tvec_timeoutsetup(struct tvec_state *tv, const struct tvec_env *env, reset(tc); - if (subenv && subenv->ctxsz) tc->subctx = x_alloc(tv->a, subenv->ctxsz); - else tc->subctx = 0; + if (subenv && subenv->ctxsz) + tc->subctx = pool_alloc(tv->p_group, subenv->ctxsz); + else + tc->subctx = 0; if (subenv && subenv->setup) subenv->setup(tv, subenv, tc, tc->subctx); } @@ -247,7 +249,6 @@ void tvec_timeoutteardown(struct tvec_state *tv, void *ctx) /* Just call the subsidiary environment. */ if (subenv && subenv->teardown) subenv->teardown(tv, tc->subctx); - x_free(tv->a, tc->subctx); } /*----- That's all, folks -------------------------------------------------*/