Merge pull request #16238 from keszybz/set-handling-more

Fix handling of cases where a duplicate item is added to a set and related cleanups
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2020-06-24 17:42:13 +02:00
committed by GitHub
46 changed files with 276 additions and 504 deletions
+1 -5
View File
@@ -3196,11 +3196,7 @@ static int link_parent(ItemArray *a) {
if (!j)
j = ordered_hashmap_get(globs, prefix);
if (j) {
r = set_ensure_allocated(&j->children, NULL);
if (r < 0)
return log_oom();
r = set_put(j->children, a);
r = set_ensure_put(&j->children, NULL, a);
if (r < 0)
return log_oom();