diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-04-12 21:44:14 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-04-12 21:44:14 +0200 |
commit | d9115e1852ae8e0cb254cf170040e48e5e6c2923 (patch) | |
tree | e2c740357a7064b46820365076cb6751b65712cb | |
parent | e86b80b834016d273196c5ec9687fddcddcf9381 (diff) |
kdbus: make sure msg structure is properly initialized
-rw-r--r-- | src/libsystemd-bus/bus-kernel.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsystemd-bus/bus-kernel.c b/src/libsystemd-bus/bus-kernel.c index 878cd9c432..c1901384ba 100644 --- a/src/libsystemd-bus/bus-kernel.c +++ b/src/libsystemd-bus/bus-kernel.c @@ -117,6 +117,8 @@ static int bus_message_setup_kmsg(sd_bus_message *m) { if (!m->kdbus) return -ENOMEM; + memset(m->kdbus, 0, sz); + m->kdbus->flags = ((m->header->flags & SD_BUS_MESSAGE_NO_REPLY_EXPECTED) ? 0 : KDBUS_MSG_FLAGS_EXPECT_REPLY) | ((m->header->flags & SD_BUS_MESSAGE_NO_AUTO_START) ? KDBUS_MSG_FLAGS_NO_AUTO_START : 0); |