Commit 0c727b3c authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

reorg a little bit.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@566 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 31af8724
......@@ -177,16 +177,16 @@ 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) {
free(he->key1);
free(he->key2);
TAILQ_REMOVE(&hcl_head[he->hash], he, list);
free(he);
ret = 0;
} else
ret = 1;
if (--he->refcnt >= 0) {
AZ(pthread_mutex_unlock(&hcl_mutex[mtx]));
return (1)
}
TAILQ_REMOVE(&hcl_head[he->hash], he, list);
AZ(pthread_mutex_unlock(&hcl_mutex[mtx]));
return (ret);
free(he->key1);
free(he->key2);
free(he);
return (0);
}
/*--------------------------------------------------------------------*/
......
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