diff --git a/doc/Changelog b/doc/Changelog index 69c18e417..dfe5673c3 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,5 +1,6 @@ 16 May 2012: Wouter - Updated doc/FEATURES with RFCs that are implemented but not listed. + - Protect if statements in val_anchor for compilate without locks. 15 May 2012: Wouter - fix configure ECDSA support in ldns detection for windows compile. diff --git a/validator/val_anchor.c b/validator/val_anchor.c index d02b42379..200bf5d97 100644 --- a/validator/val_anchor.c +++ b/validator/val_anchor.c @@ -237,14 +237,16 @@ anchor_new_ta(struct val_anchors* anchors, uint8_t* name, int namelabs, ta->namelen = namelen; ta->dclass = dclass; lock_basic_init(&ta->lock); - if(lockit) + if(lockit) { lock_basic_lock(&anchors->lock); + } #ifdef UNBOUND_DEBUG r = #endif rbtree_insert(anchors->tree, &ta->node); - if(lockit) + if(lockit) { lock_basic_unlock(&anchors->lock); + } log_assert(r != NULL); return ta; }