]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb: Covscan: unchecked return value for trbt_traversearray32()
authorPavel Filipenský <pfilipen@redhat.com>
Wed, 11 May 2022 10:06:22 +0000 (12:06 +0200)
committerJeremy Allison <jra@samba.org>
Sat, 14 May 2022 03:49:32 +0000 (03:49 +0000)
Signed-off-by: Pavel Filipenský <pfilipen@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
ctdb/server/ipalloc.c

index bacbdb32aee2a8a93ba28059e6519cf21b1416d8..7f4936439da86cf566555b063db0132483c3d6e5 100644 (file)
@@ -96,6 +96,7 @@ create_merged_ip_list(struct ipalloc_state *ipalloc_state)
        struct public_ip_list *ip_list;
        struct ctdb_public_ip_list *public_ips;
        struct trbt_tree *ip_tree;
+       int ret;
 
        ip_tree = trbt_create(ipalloc_state, 0);
 
@@ -138,7 +139,11 @@ create_merged_ip_list(struct ipalloc_state *ipalloc_state)
        }
 
        ip_list = NULL;
-       trbt_traversearray32(ip_tree, IP_KEYLEN, getips_count_callback, &ip_list);
+       ret = trbt_traversearray32(ip_tree, IP_KEYLEN, getips_count_callback, &ip_list);
+       if (ret != 0) {
+               DBG_ERR("Error traversing the IP tree.\n");
+       }
+
        talloc_free(ip_tree);
 
        return ip_list;