diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-03-04 09:20:51 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2014-03-04 10:04:50 -0500 |
commit | 6e18964d3a365567954fe10ddcfad74babdc427c (patch) | |
tree | a1e62c233e0cac0224623049e6fb98b8e450d0ac /src/core/dbus-execute.c | |
parent | e062dec5ae1a443d47885537af85d328c83c67db (diff) |
Introduce strv_consume which takes ownership
This mirrors set_consume and makes the common use a bit nicer.
Diffstat (limited to 'src/core/dbus-execute.c')
-rw-r--r-- | src/core/dbus-execute.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c index 6d0bdce9dc..3a05303f08 100644 --- a/src/core/dbus-execute.c +++ b/src/core/dbus-execute.c @@ -385,11 +385,9 @@ static int property_get_syscall_filter( if (!name) continue; - r = strv_push(&l, name); - if (r < 0) { - free(name); - return -ENOMEM; - } + r = strv_consume(&l, name); + if (r < 0) + return r; } #endif |