diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-01-24 22:21:16 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-01-24 22:21:16 -0500 |
commit | f0c03de85afa93d1df2bb533a46748e7f4264af6 (patch) | |
tree | 174a46b768f1a5e000a03fc4f2db07f5b4022ec6 /src/core/dbus.c | |
parent | 9b531f04fb16e072100b10b93613abe846140305 (diff) |
core/dbus: fix two strv memleaks
job_dbus_path and unit_dbus_path both allocate new strings, so we should use
strv_free.
Diffstat (limited to 'src/core/dbus.c')
-rw-r--r-- | src/core/dbus.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/dbus.c b/src/core/dbus.c index 1f9bf2085f..a3f701c064 100644 --- a/src/core/dbus.c +++ b/src/core/dbus.c @@ -477,7 +477,7 @@ static int bus_kill_context_find(sd_bus *bus, const char *path, const char *inte } static int bus_job_enumerate(sd_bus *bus, const char *path, void *userdata, char ***nodes, sd_bus_error *error) { - _cleanup_free_ char **l = NULL; + _cleanup_strv_free_ char **l = NULL; Manager *m = userdata; unsigned k = 0; Iterator i; @@ -504,7 +504,7 @@ static int bus_job_enumerate(sd_bus *bus, const char *path, void *userdata, char } static int bus_unit_enumerate(sd_bus *bus, const char *path, void *userdata, char ***nodes, sd_bus_error *error) { - _cleanup_free_ char **l = NULL; + _cleanup_strv_free_ char **l = NULL; Manager *m = userdata; unsigned k = 0; Iterator i; |