From: phk Date: Wed, 26 Nov 2008 16:10:19 +0000 (+0000) Subject: Always release WRW, also on error. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=272be2395d9b17011773be545660ac3aed6809e3;p=varnish Always release WRW, also on error. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3446 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_fetch.c b/varnish-cache/bin/varnishd/cache_fetch.c index 2446e59b..83fbbda3 100644 --- a/varnish-cache/bin/varnishd/cache_fetch.c +++ b/varnish-cache/bin/varnishd/cache_fetch.c @@ -353,12 +353,7 @@ Fetch(struct sess *sp) /* Deal with any message-body the request might have */ i = FetchReqBody(sp); - if (i > 0) { - VBE_ClosedFd(sp); - return (__LINE__); - } - - if (WRW_FlushRelease(w)) { + if (WRW_FlushRelease(w) || i > 0) { VBE_ClosedFd(sp); /* XXX: other cleanup ? */ return (__LINE__);