[6.0] 70a444b91 Deref the objhead if we don't return a busy object.
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Wed Oct 31 13:08:13 UTC 2018
commit 70a444b9116717f2821a421800fc7182d14cdce9
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Tue Sep 4 10:15:52 2018 +0000
Deref the objhead if we don't return a busy object.
Most of the heavy lifting by: slink
Fixes: #2760, #2754, #2654
diff --git a/bin/varnishd/cache/cache_hash.c b/bin/varnishd/cache/cache_hash.c
index 182a7a97d..bb32d4fc2 100644
--- a/bin/varnishd/cache/cache_hash.c
+++ b/bin/varnishd/cache/cache_hash.c
@@ -460,7 +460,7 @@ HSH_Lookup(struct req *req, struct objcore **ocp, struct objcore **bocp,
}
Lck_Unlock(&oh->mtx);
*ocp = oc;
- if (retval == HSH_HIT)
+ if (*bocp == NULL)
assert(HSH_DerefObjHead(wrk, &oh));
return (retval);
}
More information about the varnish-commit
mailing list