summaryrefslogtreecommitdiffstats
path: root/src/shared/userdb.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-06-05 14:40:08 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-06-24 10:38:15 +0200
commit35e601d4f92110e7da0dc5c950250b424f4fdb11 (patch)
tree649576b262937e6a9e3a984ca43286084bd05a6a /src/shared/userdb.c
parentnetworkd: take ref immediately after storing item in set (diff)
downloadsystemd-35e601d4f92110e7da0dc5c950250b424f4fdb11.tar.xz
systemd-35e601d4f92110e7da0dc5c950250b424f4fdb11.zip
tree-wide: use set_ensure_consume() in various places
No funtional change.
Diffstat (limited to '')
-rw-r--r--src/shared/userdb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/shared/userdb.c b/src/shared/userdb.c
index f3b05a7ad3..cd9873c06e 100644
--- a/src/shared/userdb.c
+++ b/src/shared/userdb.c
@@ -359,11 +359,9 @@ static int userdb_connect(
if (r < 0)
return log_debug_errno(r, "Failed to invoke varlink method: %m");
- r = set_ensure_put(&iterator->links, &link_hash_ops, vl);
+ r = set_ensure_consume(&iterator->links, &link_hash_ops, TAKE_PTR(vl));
if (r < 0)
return log_debug_errno(r, "Failed to add varlink connection to set: %m");
-
- TAKE_PTR(vl);
return r;
}