]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-common: Fix CID 1125585 Dereference after null check (FORWARD_NULL)
authorMartin Schwenke <martin@meltin.net>
Fri, 5 Aug 2016 06:39:50 +0000 (16:39 +1000)
committerKarolin Seeger <kseeger@samba.org>
Wed, 10 Aug 2016 09:37:23 +0000 (11:37 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12110

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit b4f23a7e95cd9c8fc4a6324d4ec5a2881eaec207)

ctdb/common/rb_tree.c

index d73a43eb9257e9a5bcab59b46a3fbc839f1c0579..18418f337844393106cb83838a81fb30e1d84d26 100644 (file)
@@ -210,7 +210,7 @@ static inline int trbt_get_color_right(trbt_node_t *node)
 /* setting a NULL node to black is a nop */
 static inline void trbt_set_color(trbt_node_t *node, int color)
 {
-       if ( (node==NULL) && (color==TRBT_BLACK) ) {
+       if (node == NULL) {
                return;
        }
        node->rb_color = color;