From: phk Date: Mon, 2 Mar 2009 16:15:58 +0000 (+0000) Subject: Add a missing refcnt in the case where we lost a collision while X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bae3e92eca347599492fd62645991512d9fef79;p=varnish Add a missing refcnt in the case where we lost a collision while doing the lockless lookup. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3858 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/hash_critbit.c b/varnish-cache/bin/varnishd/hash_critbit.c index 9273e839..12c286ff 100644 --- a/varnish-cache/bin/varnishd/hash_critbit.c +++ b/varnish-cache/bin/varnishd/hash_critbit.c @@ -443,12 +443,14 @@ hcb_lookup(const struct sess *sp, struct objhead *noh) fprintf(stderr, "hcb_lookup %d\n", __LINE__); #endif } else { + CHECK_OBJ_NOTNULL(noh, OBJHEAD_MAGIC); free(noh->hash); noh->hash = NULL; VSL_stats->hcb_lock++; #ifdef PHK fprintf(stderr, "hcb_lookup %d\n", __LINE__); #endif + oh->refcnt++; } Lck_Unlock(&hcb_mtx); return (oh);