From: Amitay Isaacs Date: Thu, 4 Aug 2016 05:37:33 +0000 (+1000) Subject: ctdb-tools: Fix CID 1364699 - dereference after null check X-Git-Tag: tevent-0.9.30~218 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf1dab28d1d5887f39739eb29537727d97054c5d;p=thirdparty%2Fsamba.git ctdb-tools: Fix CID 1364699 - dereference after null check BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121 Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index 0497e8998d0..bbe07764e0f 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -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;