r3768 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Fri Feb 13 14:42:44 CET 2009


Author: phk
Date: 2009-02-13 14:42:44 +0100 (Fri, 13 Feb 2009)
New Revision: 3768

Modified:
   trunk/varnish-cache/bin/varnishd/cache_backend_cfg.c
Log:
Make sure to clean the VBE properly before releasing it.



Modified: trunk/varnish-cache/bin/varnishd/cache_backend_cfg.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_backend_cfg.c	2009-02-13 12:16:34 UTC (rev 3767)
+++ trunk/varnish-cache/bin/varnishd/cache_backend_cfg.c	2009-02-13 13:42:44 UTC (rev 3768)
@@ -112,8 +112,11 @@
 	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)



More information about the varnish-commit mailing list