39 lines
1.3 KiB
Diff
39 lines
1.3 KiB
Diff
From 6c179c1c15b7a0289bd77681353475fd40d3f877 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
Date: Tue, 24 Jan 2017 22:21:16 -0500
|
|
Subject: [PATCH] core/dbus: fix two strv memleaks
|
|
|
|
job_dbus_path and unit_dbus_path both allocate new strings, so we should use
|
|
strv_free.
|
|
|
|
(cherry picked from commit f0c03de85afa93d1df2bb533a46748e7f4264af6)
|
|
---
|
|
src/core/dbus.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/core/dbus.c b/src/core/dbus.c
|
|
index 070974fe66..c6fcd01138 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;
|
|
--
|
|
2.9.3
|
|
|