logind-acl: replace strdup()+set_consume() by set_put_strdup()

This commit is contained in:
Yu Watanabe 2018-09-01 23:09:54 +09:00
parent 8090b41ed5
commit 8a80712bcd
1 changed files with 2 additions and 6 deletions

View File

@ -206,12 +206,8 @@ int devnode_acl_all(const char *seat,
if (sd_device_get_devname(d, &node) < 0)
continue;
n = strdup(node);
if (!n)
return -ENOMEM;
log_debug("Found udev node %s for seat %s", n, seat);
r = set_consume(nodes, n);
log_debug("Found udev node %s for seat %s", node, seat);
r = set_put_strdup(nodes, node);
if (r < 0)
return r;
}