summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2016-08-05 16:38:45 +1000
committerStefan Metzmacher <metze@samba.org>2016-08-10 11:24:36 +0200
commit6e8863beb6684e32157ce98ae9f03952d1c5c840 (patch)
tree0910b712df78846caf103ebf3e27fbe2da38391d
parent9f0b1e185d5f63d4a18202a9ef2b7b519dea4d63 (diff)
downloadsamba-6e8863beb6684e32157ce98ae9f03952d1c5c840.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)
-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;