r4273 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Sun Oct 4 14:13:49 CEST 2009


Author: phk
Date: 2009-10-04 14:13:49 +0200 (Sun, 04 Oct 2009)
New Revision: 4273

Modified:
   trunk/varnish-cache/bin/varnishd/storage_persistent.c
Log:
Remember to release lock when we fail allocation.



Modified: trunk/varnish-cache/bin/varnishd/storage_persistent.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/storage_persistent.c	2009-10-04 11:52:12 UTC (rev 4272)
+++ trunk/varnish-cache/bin/varnishd/storage_persistent.c	2009-10-04 12:13:49 UTC (rev 4273)
@@ -1330,8 +1330,10 @@
 		smp_new_seg(sc);
 	}
 
-	if (needed > smp_spaceleft(sg))
+	if (needed > smp_spaceleft(sg)) {
+		Lck_Unlock(&sc->mtx);
 		return (NULL);
+	}
 
 	assert(needed <= smp_spaceleft(sg));
 



More information about the varnish-commit mailing list