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, 3 insertions, 3 deletions
diff --git a/src/libsystemd-bus/bus-message.c b/src/libsystemd-bus/bus-message.c
index c72b52d546..e531dec5cd 100644
--- a/src/libsystemd-bus/bus-message.c
+++ b/src/libsystemd-bus/bus-message.c
@@ -128,14 +128,14 @@ static void message_free(sd_bus_message *m) {
if (m->release_kdbus)
ioctl(m->bus->input_fd, KDBUS_CMD_MSG_RELEASE, m->kdbus);
+ if (m->bus)
+ sd_bus_unref(m->bus);
+
if (m->free_fds) {
close_many(m->fds, m->n_fds);
free(m->fds);
}
- if (m->bus)
- sd_bus_unref(m->bus);
-
if (m->iovec != m->iovec_fixed)
free(m->iovec);