ctdb-tools: Fix CID 1364699 - dereference after null check
authorAmitay Isaacs <amitay@gmail.com>
Thu, 4 Aug 2016 05:37:33 +0000 (15:37 +1000)
committerMartin Schwenke <martins@samba.org>
Mon, 8 Aug 2016 06:17:33 +0000 (08:17 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/tools/ctdb.c

index 0497e8998d0bc2ab5bd567f08f104e2e9f4b7db8..bbe07764e0fa248c528df3550e8b34a7099e8c15 100644 (file)
@@ -2563,6 +2563,8 @@ static void wait_for_flags(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
                if (nodemap == NULL) {
                        fprintf(stderr,
                                "Failed to get nodemap, trying again\n");
+                       sleep(1);
+                       continue;
                }
 
                flag_is_set = nodemap->node[ctdb->cmd_pnn].flags & flag;