From 4bae3e92eca347599492fd62645991512d9fef79 Mon Sep 17 00:00:00 2001 From: phk Date: Mon, 2 Mar 2009 16:15:58 +0000 Subject: [PATCH] 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 --- varnish-cache/bin/varnishd/hash_critbit.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.39.5