From: Wouter Wijngaards Date: Wed, 15 Feb 2012 15:03:36 +0000 (+0000) Subject: fix race condition. X-Git-Tag: release-1.4.17rc1~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=718dcce317e627ef8f28975f5f32d3811a676b0a;p=thirdparty%2Funbound.git fix race condition. git-svn-id: file:///svn/unbound/trunk@2625 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/validator/val_anchor.c b/validator/val_anchor.c index b9c268486..5e4c12add 100644 --- a/validator/val_anchor.c +++ b/validator/val_anchor.c @@ -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); }