summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2016-08-05 16:39:50 +1000
committerStefan Metzmacher <metze@samba.org>2016-08-10 11:24:36 +0200
commitfb3314f2ee54909c0363e53fc3eb93829c2114c5 (patch)
tree7757dce0ee3d160f01b6d6219b4ff71f30a38c37
parent6e8863beb6684e32157ce98ae9f03952d1c5c840 (diff)
downloadsamba-fb3314f2ee54909c0363e53fc3eb93829c2114c5.tar.gz
ctdb-common: Fix CID 1125585 Dereference after null check (FORWARD_NULL)
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)
-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 c3b2b91e3b0..990ec6177eb 100644
--- a/ctdb/common/rb_tree.c
+++ b/ctdb/common/rb_tree.c
@@ -216,7 +216,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;