summaryrefslogtreecommitdiff
path: root/src/machine
diff options
context:
space:
mode:
Diffstat (limited to 'src/machine')
-rw-r--r--src/machine/machine-dbus.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
index df96ccf9d4..c9e3bb7c75 100644
--- a/src/machine/machine-dbus.c
+++ b/src/machine/machine-dbus.c
@@ -225,11 +225,9 @@ int machine_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;