summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-bus/bus-message.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-01-26 17:48:14 +0100
committerLennart Poettering <lennart@poettering.net>2015-01-26 21:52:07 +0100
commit72e6110485926c884f056717a21e4f5f3942908c (patch)
tree4b5ebf4a789ccbc17fbb3473fe27aa43042b4ac7 /src/libsystemd/sd-bus/bus-message.c
parentcc98b3025eeb89addb76a27390cb2baca4eab8b9 (diff)
sd-bus: reuse the KDBUS_CMD_FREE wrapper wherever appropriate
Diffstat (limited to 'src/libsystemd/sd-bus/bus-message.c')
-rw-r--r--src/libsystemd/sd-bus/bus-message.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
index 9ae65bebc8..3f2d6e74c5 100644
--- a/src/libsystemd/sd-bus/bus-message.c
+++ b/src/libsystemd/sd-bus/bus-message.c
@@ -129,14 +129,8 @@ static void message_free(sd_bus_message *m) {
message_reset_parts(m);
- if (m->release_kdbus) {
- struct kdbus_cmd_free cmd_free = { };
-
- cmd_free.size = sizeof(cmd_free);
- 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->release_kdbus)
+ bus_kernel_cmd_free(m->bus, (uint8_t *) m->kdbus - (uint8_t *) m->bus->kdbus_buffer);
if (m->free_kdbus)
free(m->kdbus);