From: phk Date: Mon, 24 Sep 2007 07:37:40 +0000 (+0000) Subject: Fix a NULL pointer dereference which cannot currently happen. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=981b7ea259063002e013e73897f4be3a86f59d4c;p=varnish Fix a NULL pointer dereference which cannot currently happen. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2004 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/hash_classic.c b/varnish-cache/bin/varnishd/hash_classic.c index ec40d087..fd02556d 100644 --- a/varnish-cache/bin/varnishd/hash_classic.c +++ b/varnish-cache/bin/varnishd/hash_classic.c @@ -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; }