chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Introduce strv_consume which takes ownership
[elogind.git]
/
src
/
machine
/
machine-dbus.c
diff --git
a/src/machine/machine-dbus.c
b/src/machine/machine-dbus.c
index df96ccf9d480c7acf7a226622cf39fc500c01eaf..c9e3bb7c758d0793dafe7338cb4f7afbeba55c3a 100644
(file)
--- 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;
if (!p)
return -ENOMEM;
- r = strv_push(&l, p);
- if (r < 0) {
- free(p);
+ r = strv_consume(&l, p);
+ if (r < 0)
return r;
return r;
- }
}
*nodes = l;
}
*nodes = l;