From 53e9dbcdfbae355aae8edb79d49e50a0ec3912d5 Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Tue, 7 Oct 2014 12:02:04 +0200 Subject: sd-bus: fix KDBUS_CMD_FREE user Fix a user of the KDBUS_CMD_FREE ioctl that was missed in the transition. --- src/libsystemd/sd-bus/bus-message.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/libsystemd') diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c index 400ba307bc..c7cb2e60bc 100644 --- a/src/libsystemd/sd-bus/bus-message.c +++ b/src/libsystemd/sd-bus/bus-message.c @@ -128,10 +128,11 @@ static void message_free(sd_bus_message *m) { message_reset_parts(m); if (m->release_kdbus) { - uint64_t off _alignas_(8); + struct kdbus_cmd_free cmd_free; - off = (uint8_t *)m->kdbus - (uint8_t *)m->bus->kdbus_buffer; - ioctl(m->bus->input_fd, KDBUS_CMD_FREE, &off); + cmd_free.flags = 0; + cmd_free.offset = (uint8_t *)m->kdbus - (uint8_t *)m->bus->kdbus_buffer; + (void) ioctl(m->bus->input_fd, KDBUS_CMD_FREE, &cmd_free); } if (m->free_kdbus) -- cgit v1.2.3-54-g00ecf