summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2016-08-05 16:38:45 +1000
committerKarolin Seeger <kseeger@samba.org>2016-08-10 09:03:26 +0200
commit3a182d140d2fd854b453eb27222697ae6e9f5b0a (patch)
tree74bd25c03fd0ba4eed7f61e033079e6ff0a34d8d /ctdb
parentd6bbbb7ef878180cba8cb0fab4ea68750ac8ea41 (diff)
downloadsamba-3a182d140d2fd854b453eb27222697ae6e9f5b0a.tar.gz
ctdb-common: Fix CID 1125583 Dereference after null check (FORWARD_NULL)
This also fixes CID 1125584. 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 bbf0b907cb04184515d0f5f09f14824df1c2e59f)
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/common/rb_tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ctdb/common/rb_tree.c b/ctdb/common/rb_tree.c
index f4aee8bf2b8..c3b2b91e3b0 100644
--- a/ctdb/common/rb_tree.c
+++ b/ctdb/common/rb_tree.c
@@ -223,7 +223,7 @@ static inline void trbt_set_color(trbt_node_t *node, int color)
}
static inline void trbt_set_color_left(trbt_node_t *node, int color)
{
- if ( ((node==NULL)||(node->left==NULL)) && (color==TRBT_BLACK) ) {
+ if (node == NULL || node->left == NULL) {
return;
}
node->left->rb_color = color;