diff options
author | Martin Schwenke <martin@meltin.net> | 2016-08-05 16:37:00 +1000 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2016-08-10 11:24:36 +0200 |
commit | 9f0b1e185d5f63d4a18202a9ef2b7b519dea4d63 (patch) | |
tree | 0328ac528d6b9d9363040b77ce1532964e547724 | |
parent | 29c0b81d814cf41593afa44492e0bfb7cf78a443 (diff) | |
download | samba-9f0b1e185d5f63d4a18202a9ef2b7b519dea4d63.tar.gz |
ctdb-common: Fix CID 1125581 Dereference after null check (FORWARD_NULL)
This also fixes CID 1125582.
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 7ae3699831427725f12e0a26a0681e59f2fbb2d9)
-rw-r--r-- | ctdb/common/rb_tree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ctdb/common/rb_tree.c b/ctdb/common/rb_tree.c index 1c602a730b7..f4aee8bf2b8 100644 --- a/ctdb/common/rb_tree.c +++ b/ctdb/common/rb_tree.c @@ -230,7 +230,7 @@ static inline void trbt_set_color_left(trbt_node_t *node, int color) } static inline void trbt_set_color_right(trbt_node_t *node, int color) { - if ( ((node==NULL)||(node->right==NULL)) && (color==TRBT_BLACK) ) { + if (node == NULL || node->right == NULL) { return; } node->right->rb_color = color; |