1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-08 21:17:47 +03:00

sd-bus: fix KDBUS_CMD_FREE user

Fix a user of the KDBUS_CMD_FREE ioctl that was missed in the transition.
This commit is contained in:
Daniel Mack 2014-10-07 12:02:04 +02:00
parent ca794c8e95
commit 53e9dbcdfb

View File

@ -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)