projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8090b41
)
logind-acl: replace strdup()+set_consume() by set_put_strdup()
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Sat, 1 Sep 2018 14:09:54 +0000
(23:09 +0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Sun, 23 Sep 2018 08:18:50 +0000
(17:18 +0900)
src/login/logind-acl.c
patch
|
blob
|
history
diff --git
a/src/login/logind-acl.c
b/src/login/logind-acl.c
index
da197d0
..
5453ebb
100644
(file)
--- a/
src/login/logind-acl.c
+++ b/
src/login/logind-acl.c
@@
-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;
}