r2004 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Mon Sep 24 09:37:41 CEST 2007


Author: phk
Date: 2007-09-24 09:37:40 +0200 (Mon, 24 Sep 2007)
New Revision: 2004

Modified:
   trunk/varnish-cache/bin/varnishd/hash_classic.c
Log:
Fix a NULL pointer dereference which cannot currently happen.


Modified: trunk/varnish-cache/bin/varnishd/hash_classic.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/hash_classic.c	2007-09-24 07:37:29 UTC (rev 2003)
+++ trunk/varnish-cache/bin/varnishd/hash_classic.c	2007-09-24 07:37:40 UTC (rev 2004)
@@ -167,7 +167,7 @@
 			 */
 			if (he2 != NULL)
 				free(he2);
-			if (noh->hash != NULL) {
+			if (noh != NULL && noh->hash != NULL) {
 				free(noh->hash);
 				noh->hash = NULL;
 			}




More information about the varnish-commit mailing list