From: Volker Lendecke Date: Tue, 16 Feb 2016 10:20:56 +0000 (+0100) Subject: ctdb: Fix CID 1353175 Logically dead code X-Git-Tag: ldb-1.1.26~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7b3fb853a42ae02aae7420b09d21aad727284bbe;p=thirdparty%2Fsamba.git ctdb: Fix CID 1353175 Logically dead code Signed-off-by: Volker Lendecke Reviewed-by: Martin Schwenke Reviewed-by: Michael Adam --- diff --git a/ctdb/server/ctdb_takeover.c b/ctdb/server/ctdb_takeover.c index cdb4601d4b5..62af1e668d4 100644 --- a/ctdb/server/ctdb_takeover.c +++ b/ctdb/server/ctdb_takeover.c @@ -1340,17 +1340,18 @@ create_merged_ip_list(struct ctdb_context *ctdb, struct ipalloc_state *ipalloc_s ctdb->ip_tree = trbt_create(ctdb, 0); for (i=0; i < ctdb->num_nodes; i++) { - public_ips = &ipalloc_state->known_public_ips[i]; if (ctdb->nodes[i]->flags & NODE_FLAGS_DELETED) { continue; } /* there were no public ips for this node */ - if (public_ips == NULL) { + if (ipalloc_state->known_public_ips == NULL) { continue; } + public_ips = &ipalloc_state->known_public_ips[i]; + for (j=0; j < public_ips->num; j++) { struct public_ip_list *tmp_ip;