X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/32654a316b5925914f5e5f481971d47f9728edab..93910f6a123c1a3972978c7a9134a42f38f1ac74:/site.c diff --git a/site.c b/site.c index 1c57a8a..756ad35 100644 --- a/site.c +++ b/site.c @@ -1927,7 +1927,7 @@ static list_t *site_apply(closure_t *self, struct cloc loc, dict_t *context, dict_t *dict; int i; - st=safe_malloc(sizeof(*st),"site_apply"); + NEW(st); st->cl.description="site"; st->cl.type=CL_SITE; @@ -1980,7 +1980,7 @@ static list_t *site_apply(closure_t *self, struct cloc loc, dict_t *context, if (!things##_cfg) \ cfgfatal(loc,"site","closure list \"%s\" not found\n",dictkey); \ st->nthings=list_length(things##_cfg); \ - st->things=safe_malloc_ary(sizeof(*st->things),st->nthings,dictkey "s"); \ + NEW_ARY(st->things,st->nthings); \ assert(st->nthings); \ for (i=0; inthings; i++) { \ item_t *item=list_elem(things##_cfg,i); \