From 09cbfa6c9c87f864bb4b044e27dcbb944855aa22 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Fri, 5 Aug 2016 16:39:50 +1000 Subject: [PATCH] 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 Reviewed-by: Amitay Isaacs (cherry picked from commit b4f23a7e95cd9c8fc4a6324d4ec5a2881eaec207) --- ctdb/common/rb_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctdb/common/rb_tree.c b/ctdb/common/rb_tree.c index d73a43eb925..18418f33784 100644 --- a/ctdb/common/rb_tree.c +++ b/ctdb/common/rb_tree.c @@ -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; -- 2.47.2