r3448 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Mon Dec 1 21:24:47 CET 2008
Author: phk
Date: 2008-12-01 21:24:46 +0100 (Mon, 01 Dec 2008)
New Revision: 3448
Modified:
trunk/varnish-cache/bin/varnishd/cache_hash.c
Log:
We cannot gain a reference to an object unless it has an objhead,
assert that we have one.
Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_hash.c 2008-12-01 14:13:49 UTC (rev 3447)
+++ trunk/varnish-cache/bin/varnishd/cache_hash.c 2008-12-01 20:24:46 UTC (rev 3448)
@@ -427,14 +427,11 @@
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
More information about the varnish-commit
mailing list