Fix dict traversal

This commit is contained in:
XANTRONIX Development 2020-05-23 13:44:52 -04:00 committed by XANTRONIX Industrial
parent dc55a7fc6c
commit 5754c383a6

View file

@ -76,13 +76,19 @@ static int bucket_each_slot(int level, patty_dict_bucket *bucket, patty_dict_cal
}
if (slot->next) {
return bucket_each_slot(level+1, (patty_dict_bucket *)slot->next, callback, ctx);
if (bucket_each_slot(level+1,
(patty_dict_bucket *)slot->next,
callback,
ctx) < 0) {
goto error_next_slot;
}
}
}
return 0;
error_callback:
error_next_slot:
return -1;
}