]> err.no Git - varnish/commitdiff
Fix a NULL pointer dereference which cannot currently happen.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 24 Sep 2007 07:37:40 +0000 (07:37 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 24 Sep 2007 07:37:40 +0000 (07:37 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2004 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/hash_classic.c

index ec40d08782a6ea82e73c152a3e9d3de898f17e80..fd02556df504ed38a6d6a7956cd3c658e9be787e 100644 (file)
@@ -167,7 +167,7 @@ hcl_lookup(struct sess *sp, struct objhead *noh)
                         */
                        if (he2 != NULL)
                                free(he2);
-                       if (noh->hash != NULL) {
+                       if (noh != NULL && noh->hash != NULL) {
                                free(noh->hash);
                                noh->hash = NULL;
                        }