From 4eb76f9d9c77460554b928c173f8a349addb043d Mon Sep 17 00:00:00 2001 From: phk Date: Tue, 1 Jul 2008 19:31:16 +0000 Subject: [PATCH] Polish: use mini_obj.h git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2876 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_dir_simple.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/varnish-cache/bin/varnishd/cache_dir_simple.c b/varnish-cache/bin/varnishd/cache_dir_simple.c index 5cc51313..bbea2194 100644 --- a/varnish-cache/bin/varnishd/cache_dir_simple.c +++ b/varnish-cache/bin/varnishd/cache_dir_simple.c @@ -73,7 +73,8 @@ vdi_simple_fini(struct director *d) CAST_OBJ_NOTNULL(vs, d->priv, VDI_SIMPLE_MAGIC); VBE_DropRef(vs->backend); - free(vs); + vs->dir.magic = 0; + FREE_OBJ(vs); } void @@ -83,9 +84,8 @@ VRT_init_dir_simple(struct cli *cli, struct director **bp, const struct vrt_dir_ (void)cli; - vs = calloc(sizeof *vs, 1); + ALLOC_OBJ(vs, VDI_SIMPLE_MAGIC); XXXAN(vs); - vs->magic = VDI_SIMPLE_MAGIC; vs->dir.magic = DIRECTOR_MAGIC; vs->dir.priv = vs; vs->dir.name = "simple"; -- 2.39.5