summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/sd-bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd-bus/sd-bus.c')
-rw-r--r--src/libsystemd-bus/sd-bus.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/libsystemd-bus/sd-bus.c b/src/libsystemd-bus/sd-bus.c
index c7511c32d2..7d6d848ec5 100644
--- a/src/libsystemd-bus/sd-bus.c
+++ b/src/libsystemd-bus/sd-bus.c
@@ -1841,13 +1841,9 @@ static int process_introspect(sd_bus *bus, sd_bus_message *m) {
if (p)
*p = 0;
- r = set_put(s, a);
- if (r < 0) {
- free(a);
-
- if (r != -EEXIST)
- return r;
- }
+ r = set_consume(s, a);
+ if (r < 0 && r != -EEXIST)
+ return r;
}
f = open_memstream(&introspection, &size);