From: Pavel Filipenský Date: Wed, 11 May 2022 10:06:22 +0000 (+0200) Subject: ctdb: Covscan: unchecked return value for trbt_traversearray32() X-Git-Tag: talloc-2.3.4~134 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cb65650117569dadf5c764f72e5cfb292efb5a4;p=thirdparty%2Fsamba.git ctdb: Covscan: unchecked return value for trbt_traversearray32() Signed-off-by: Pavel Filipenský Reviewed-by: Jeremy Allison Reviewed-by: Douglas Bagnall --- diff --git a/ctdb/server/ipalloc.c b/ctdb/server/ipalloc.c index bacbdb32aee..7f4936439da 100644 --- a/ctdb/server/ipalloc.c +++ b/ctdb/server/ipalloc.c @@ -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;