summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/bus-message.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd-bus/bus-message.c')
-rw-r--r--src/libsystemd-bus/bus-message.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libsystemd-bus/bus-message.c b/src/libsystemd-bus/bus-message.c
index fdc3ac6813..cc2b78a8c5 100644
--- a/src/libsystemd-bus/bus-message.c
+++ b/src/libsystemd-bus/bus-message.c
@@ -66,11 +66,17 @@ static void message_free(sd_bus_message *m) {
if (m->free_kdbus)
free(m->kdbus);
+ if (m->release_kdbus)
+ ioctl(m->bus->input_fd, KDBUS_CMD_MSG_RELEASE, m->kdbus);
+
if (m->free_fds) {
close_many(m->fds, m->n_fds);
free(m->fds);
}
+ if (m->bus)
+ sd_bus_unref(m->bus);
+
free(m->cmdline_array);
reset_containers(m);