]> err.no Git - varnish/commitdiff
Make sure to clean the VBE properly before releasing it.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 13 Feb 2009 13:42:44 +0000 (13:42 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Fri, 13 Feb 2009 13:42:44 +0000 (13:42 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3768 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_backend_cfg.c

index 50a557b0638df6d0044a370376a03700170ffdaf..311d2137ceb9c0830c4d321564278baef51bc3cc 100644 (file)
@@ -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)