[systemd-commits] src/libsystemd-bus
Kay Sievers
kay at kemper.freedesktop.org
Sat Nov 2 02:39:46 CET 2013
src/libsystemd-bus/bus-util.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 164ddcfae8bf33b8308928f01597882da2a86977
Author: Kay Sievers <kay at vrfy.org>
Date: Sat Nov 2 02:35:23 2013 +0100
bus: make bus_map_all_properties() call idempotent
diff --git a/src/libsystemd-bus/bus-util.c b/src/libsystemd-bus/bus-util.c
index 857e0c1..bb5dd29 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;
More information about the systemd-commits
mailing list