r5481 - trunk/varnish-cache/bin/varnishd

phk at varnish-cache.org phk at varnish-cache.org
Wed Oct 27 22:51:27 CEST 2010


Author: phk
Date: 2010-10-27 22:51:27 +0200 (Wed, 27 Oct 2010)
New Revision: 5481

Modified:
   trunk/varnish-cache/bin/varnishd/cache_pool.c
   trunk/varnish-cache/bin/varnishd/cache_vcl.c
Log:
Only release VCL if we have one



Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_pool.c	2010-10-27 20:07:28 UTC (rev 5480)
+++ trunk/varnish-cache/bin/varnishd/cache_pool.c	2010-10-27 20:51:27 UTC (rev 5481)
@@ -190,8 +190,10 @@
 		AZ(w->wfd);
 		assert(w->wlp == w->wlb);
 		w->wrq = NULL;
-		if (params->diag_bitmap & 0x00040000)
-			VCL_Rel(&w->vcl);
+		if (params->diag_bitmap & 0x00040000) {
+			if (w->vcl != NULL)
+				VCL_Rel(&w->vcl);
+		}
 		if (!Lck_Trylock(&wstat_mtx)) {
 			wrk_sumstat(w);
 			Lck_Unlock(&wstat_mtx);

Modified: trunk/varnish-cache/bin/varnishd/cache_vcl.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_vcl.c	2010-10-27 20:07:28 UTC (rev 5480)
+++ trunk/varnish-cache/bin/varnishd/cache_vcl.c	2010-10-27 20:51:27 UTC (rev 5481)
@@ -104,6 +104,7 @@
 {
 	struct VCL_conf *vc;
 
+	AN(*vcc);
 	vc = *vcc;
 	*vcc = NULL;
 




More information about the varnish-commit mailing list