node_map->num_nodes += 1;
}
+ if (node_map->num_nodes == 0) {
+ goto fail;
+ }
+
DEBUG(DEBUG_INFO, ("Parsing nodemap done\n"));
return true;
iface_map->num += 1;
}
+ if (iface_map->num == 0) {
+ goto fail;
+ }
+
DEBUG(DEBUG_INFO, ("Parsing interfaces done\n"));
return true;
vnn_map->size += 1;
}
+ if (vnn_map->size == 0) {
+ goto fail;
+ }
+
DEBUG(DEBUG_INFO, ("Parsing vnnmap done\n"));
return true;
}
if (line[0] == '\n') {
- /* Recovery lock remains unset */
- goto ok;
+ goto fail;
}
/* Get rid of pesky newline */
if (ctdb->reclock == NULL) {
goto fail;
}
-ok:
+
/* Swallow possible blank line following section. Picky
* compiler settings don't allow the return value to be
* ignored, so make the compiler happy.
DLIST_ADD_END(db_map->db, db);
}
+ if (db_map->db == NULL) {
+ goto fail;
+ }
+
DEBUG(DEBUG_INFO, ("Parsing dbmap done\n"));
return true;
ctdb->known_ips = ipalloc_read_known_ips(ctdb, numnodes, false);
- status = (ctdb->known_ips != NULL);
+ status = (ctdb->known_ips != NULL && ctdb->known_ips->num != 0);
if (status) {
D_INFO("Parsing public IPs done\n");
DLIST_ADD(ctdb->control_failures, failure);
}
+ if (ctdb->control_failures == NULL) {
+ goto fail;
+ }
+
D_INFO("Parsing fake control failures done\n");
return true;