From 272be2395d9b17011773be545660ac3aed6809e3 Mon Sep 17 00:00:00 2001 From: phk Date: Wed, 26 Nov 2008 16:10:19 +0000 Subject: [PATCH] Always release WRW, also on error. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3446 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_fetch.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) 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__); -- 2.39.5