We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ccf609c commit 9118155Copy full SHA for 9118155
src/busctl/busctl.c
@@ -464,14 +464,6 @@ static int tree_one(sd_bus *bus, const char *service) {
464
if (r < 0)
465
return log_oom();
466
467
- done = set_new(&string_hash_ops_free);
468
- if (!done)
469
- return log_oom();
470
-
471
- failed = set_new(&string_hash_ops_free);
472
- if (!failed)
473
474
475
for (;;) {
476
_cleanup_free_ char *p = NULL;
477
int q;
@@ -488,7 +480,7 @@ static int tree_one(sd_bus *bus, const char *service) {
488
480
if (q < 0 && r >= 0)
489
481
r = q;
490
482
491
- q = set_consume(q < 0 ? failed : done, TAKE_PTR(p));
483
+ q = set_ensure_consume(q < 0 ? &failed : &done, &string_hash_ops_free, TAKE_PTR(p));
492
484
assert(q != 0);
493
485
if (q < 0)
494
486
0 commit comments