summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/bus-kernel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd/sd-bus/bus-kernel.c')
-rw-r--r--src/libsystemd/sd-bus/bus-kernel.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c
index 09ff25fe71..5ae1418afc 100644
--- a/src/libsystemd/sd-bus/bus-kernel.c
+++ b/src/libsystemd/sd-bus/bus-kernel.c
@@ -799,14 +799,17 @@ int bus_kernel_connect(sd_bus *b) {
}
static void close_kdbus_msg(sd_bus *bus, struct kdbus_msg *k) {
+ struct kdbus_cmd_free cmd;
uint64_t off _alignas_(8);
struct kdbus_item *d;
assert(bus);
assert(k);
- off = (uint8_t *)k - (uint8_t *)bus->kdbus_buffer;
- ioctl(bus->input_fd, KDBUS_CMD_FREE, &off);
+ cmd.flags = 0;
+ cmd.offset = (uint8_t *)k - (uint8_t *)bus->kdbus_buffer;
+
+ ioctl(bus->input_fd, KDBUS_CMD_FREE, &cmd);
KDBUS_ITEM_FOREACH(d, k, items) {