fix race condition.

git-svn-id: file:///svn/unbound/trunk@2625 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2012-02-15 15:03:36 +00:00
parent 08835e01ee
commit 718dcce317

View file

@ -1249,7 +1249,6 @@ anchors_delete_insecure(struct val_anchors* anchors, uint16_t c,
/* its not an insecure point, do not remove it */
return;
}
lock_basic_unlock(&ta->lock);
/* remove from tree */
rbtree_delete(anchors->tree, &ta->node);
@ -1257,6 +1256,7 @@ anchors_delete_insecure(struct val_anchors* anchors, uint16_t c,
lock_basic_unlock(&anchors->lock);
/* actual free of data */
lock_basic_unlock(&ta->lock);
anchors_delfunc(&ta->node, NULL);
}