summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd-bus')
-rw-r--r--src/libsystemd-bus/bus-util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsystemd-bus/bus-util.c b/src/libsystemd-bus/bus-util.c
index 857e0c16ed..bb5dd29a57 100644
--- a/src/libsystemd-bus/bus-util.c
+++ b/src/libsystemd-bus/bus-util.c
@@ -656,7 +656,7 @@ int bus_map_all_properties(sd_bus *bus,
break;
for (i = 0; map[i].type; i++) {
- const char **p;
+ char **p;
if (!streq(map[i].type, "s"))
continue;
@@ -664,6 +664,7 @@ int bus_map_all_properties(sd_bus *bus,
continue;
p = map[i].ptr;
+ free(*p);
*p = strdup(s);
if (!*p) {
r = -ENOMEM;