Commit c545e397 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@3448 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent dfd6ba06
......@@ -427,13 +427,10 @@ HSH_Ref(struct object *o)
CHECK_OBJ_NOTNULL(o, OBJECT_MAGIC);
oh = o->objhead;
if (oh != NULL) {
CHECK_OBJ(oh, OBJHEAD_MAGIC);
CHECK_OBJ_NOTNULL(oh, OBJHEAD_MAGIC);
Lck_Lock(&oh->mtx);
}
assert(o->refcnt > 0);
o->refcnt++;
if (oh != NULL)
Lck_Unlock(&oh->mtx);
}
......
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