From: phk Date: Tue, 29 Jan 2008 10:59:01 +0000 (+0000) Subject: Close another possible NULL dereference X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8dc278ee863cf6ea31ace6a940b08bd6b8db536;p=varnish Close another possible NULL dereference git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2396 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_hash.c b/varnish-cache/bin/varnishd/cache_hash.c index 56946e02..7542745c 100644 --- a/varnish-cache/bin/varnishd/cache_hash.c +++ b/varnish-cache/bin/varnishd/cache_hash.c @@ -352,7 +352,8 @@ HSH_Deref(struct object *o) } 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);