Commit 85dc2aa0 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

We cannot gain a reference to an object unless it has an objhead,

assert that we have one.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@3448 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent fbb07cd8
......@@ -427,14 +427,11 @@ HSH_Ref(struct object *o)
CHECK_OBJ_NOTNULL(o, OBJECT_MAGIC);
oh = o->objhead;
if (oh != NULL) {
CHECK_OBJ(oh, OBJHEAD_MAGIC);
Lck_Lock(&oh->mtx);
}
CHECK_OBJ_NOTNULL(oh, OBJHEAD_MAGIC);
Lck_Lock(&oh->mtx);
assert(o->refcnt > 0);
o->refcnt++;
if (oh != NULL)
Lck_Unlock(&oh->mtx);
Lck_Unlock(&oh->mtx);
}
void
......
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