]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb: Fix CID 1353175 Logically dead code
authorVolker Lendecke <vl@samba.org>
Tue, 16 Feb 2016 10:20:56 +0000 (11:20 +0100)
committerMichael Adam <obnox@samba.org>
Tue, 16 Feb 2016 15:41:18 +0000 (16:41 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Michael Adam <obnox@samba.org>
ctdb/server/ctdb_takeover.c

index cdb4601d4b528029efcd2299c3fcc95ed8ab9342..62af1e668d42dfa6d2dd76c2e0fa6cf40182321e 100644 (file)
@@ -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;