diff options
Diffstat (limited to 'src/libsystemd-bus/bus-message.c')
-rw-r--r-- | src/libsystemd-bus/bus-message.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libsystemd-bus/bus-message.c b/src/libsystemd-bus/bus-message.c index 6f2f3e9039..e6bf9db99a 100644 --- a/src/libsystemd-bus/bus-message.c +++ b/src/libsystemd-bus/bus-message.c @@ -125,8 +125,12 @@ 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->release_kdbus) { + uint64_t off; + + off = (uint8_t *)m->kdbus - (uint8_t *)m->bus->kdbus_buffer; + ioctl(m->bus->input_fd, KDBUS_CMD_MSG_RELEASE, &off); + } if (m->bus) sd_bus_unref(m->bus); |