summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/torture/torture.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/torture/torture.c b/source3/torture/torture.c
index 99896ecc81..159dc0bd0c 100644
--- a/source3/torture/torture.c
+++ b/source3/torture/torture.c
@@ -7970,7 +7970,7 @@ static bool run_local_talloc_dict(int dummy)
{
struct talloc_dict *dict;
struct talloc_dict_test *t;
- int key, count;
+ int key, count, res;
dict = talloc_dict_init(talloc_tos());
if (dict == NULL) {
@@ -7989,7 +7989,8 @@ static bool run_local_talloc_dict(int dummy)
}
count = 0;
- if (talloc_dict_traverse(dict, talloc_dict_traverse_fn, &count) != 0) {
+ res = talloc_dict_traverse(dict, talloc_dict_traverse_fn, &count);
+ if (res == -1) {
return false;
}
@@ -7997,6 +7998,10 @@ static bool run_local_talloc_dict(int dummy)
return false;
}
+ if (count != res) {
+ return false;
+ }
+
TALLOC_FREE(dict);
return true;