Commit d2e2ca5e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Close a race between hcb_insert() and hcb_delete()

Hit by:	dormando



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4719 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 0b178560
......@@ -212,6 +212,12 @@ hcb_insert(struct hcb_root *root, struct objhead *oh, int has_lock)
pp = *p;
}
if (pp == 0) {
/* We raced hcb_delete and got a NULL pointer */
assert(!has_lock);
return (NULL);
}
assert(hcb_is_node(pp));
/* We found a node, does it match ? */
......
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