Commit 635d525a authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Fixx off by one error.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@587 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 6a5cc88d
......@@ -176,7 +176,8 @@ hcl_deref(struct objhead *oh)
CAST_OBJ_NOTNULL(he, oh->hashpriv, HCL_ENTRY_MAGIC);
mtx = he->mtx;
AZ(pthread_mutex_lock(&hcl_mutex[mtx]));
if (--he->refcnt >= 0) {
assert(he->refcnt > 0);
if (--he->refcnt > 0) {
AZ(pthread_mutex_unlock(&hcl_mutex[mtx]));
return (1);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment