r2396 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Tue Jan 29 11:59:02 CET 2008


Author: phk
Date: 2008-01-29 11:59:01 +0100 (Tue, 29 Jan 2008)
New Revision: 2396

Modified:
   trunk/varnish-cache/bin/varnishd/cache_hash.c
Log:
Close another possible NULL dereference


Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_hash.c	2008-01-29 10:57:30 UTC (rev 2395)
+++ trunk/varnish-cache/bin/varnishd/cache_hash.c	2008-01-29 10:59:01 UTC (rev 2396)
@@ -352,7 +352,8 @@
 	}
 	assert(o->refcnt > 0);
 	r = --o->refcnt;
-	hsh_rush(oh);
+	if (oh != NULL)
+		hsh_rush(oh);
 	if (oh != NULL) {
 		if (!r)
 			VTAILQ_REMOVE(&oh->objects, o, list);




More information about the varnish-commit mailing list