From: phk Date: Mon, 1 Oct 2007 09:04:15 +0000 (+0000) Subject: Initialize the obj->ws before we use it. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c357f6a8f3b88b479eed00244ce5f6678d1bf5d7;p=varnish Initialize the obj->ws before we use it. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2074 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_synthetic.c b/varnish-cache/bin/varnishd/cache_synthetic.c index 10d1b16a..863f0023 100644 --- a/varnish-cache/bin/varnishd/cache_synthetic.c +++ b/varnish-cache/bin/varnishd/cache_synthetic.c @@ -70,6 +70,13 @@ SYN_ErrorPage(struct sess *sp, int status, const char *reason, int ttl) h = o->http; now = TIM_real(); + /* Set up obj's workspace */ + st = o->objstore; + WS_Init(o->ws_o, st->ptr + st->len, st->space - st->len); + st->len = st->space; + WS_Assert(o->ws_o); + http_Setup(o->http, o->ws_o); + /* look up HTTP response */ msg = http_StatusMessage(status); if (reason == NULL)