summaryrefslogtreecommitdiff
path: root/src/login/logind-seat-dbus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/login/logind-seat-dbus.c')
-rw-r--r--src/login/logind-seat-dbus.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/login/logind-seat-dbus.c b/src/login/logind-seat-dbus.c
index 26cddfea70..315e6baf6b 100644
--- a/src/login/logind-seat-dbus.c
+++ b/src/login/logind-seat-dbus.c
@@ -399,11 +399,9 @@ int seat_node_enumerator(sd_bus *bus, const char *path, void *userdata, char ***
if (!p)
return -ENOMEM;
- r = strv_push(&l, p);
- if (r < 0) {
- free(p);
+ r = strv_consume(&l, p);
+ if (r < 0)
return r;
- }
}
*nodes = l;