From: phk Date: Fri, 13 Feb 2009 13:42:44 +0000 (+0000) Subject: Make sure to clean the VBE properly before releasing it. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=288fa1967da567b1d8095c41a8238f965e99478d;p=varnish Make sure to clean the VBE properly before releasing it. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3768 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_backend_cfg.c b/varnish-cache/bin/varnishd/cache_backend_cfg.c index 50a557b0..311d2137 100644 --- a/varnish-cache/bin/varnishd/cache_backend_cfg.c +++ b/varnish-cache/bin/varnishd/cache_backend_cfg.c @@ -112,8 +112,11 @@ VBE_DropRefLocked(struct backend *b) ASSERT_CLI(); VTAILQ_FOREACH_SAFE(vbe, &b->connlist, list, vbe2) { VTAILQ_REMOVE(&b->connlist, vbe, list); - if (vbe->fd >= 0) + if (vbe->fd >= 0) { AZ(close(vbe->fd)); + vbe->fd = -1; + } + vbe->backend = NULL; VBE_ReleaseConn(vbe); } if (b->probe != NULL)