]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Protect if statements in val_anchor for compilate without locks.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 16 May 2012 10:54:52 +0000 (10:54 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 16 May 2012 10:54:52 +0000 (10:54 +0000)
git-svn-id: file:///svn/unbound/trunk@2670 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
validator/val_anchor.c

index 69c18e41775761669c3740c84f6c031296c78a60..dfe5673c30767749de3c075f039a507c8faaed7c 100644 (file)
@@ -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.
index d02b423792f3ccb4d345766ab979f38fd1919584..200bf5d97be610edcaeba285a6a4c56c1bf8f654 100644 (file)
@@ -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;
 }