summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2014-12-11 10:45:58 +0100
committerDavid Herrmann <dh.herrmann@gmail.com>2014-12-11 10:45:58 +0100
commit055b27f29484b625e03706319c918e3a644e00b9 (patch)
tree48a64078c9d5bb158b0e9c5034d09b644b7dfa02
parentbecb1a6e9deabad529c8bc1c90eb7d947505695b (diff)
bus: zero cmd_free before passing to ioctl
Make sure the whole cmd_free object is zeroed before passing it into the kernel. This makes valgrind happy and makes us future proof.
-rw-r--r--src/libsystemd/sd-bus/bus-message.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
index 0803999e07..6bf39cef6b 100644
--- a/src/libsystemd/sd-bus/bus-message.c
+++ b/src/libsystemd/sd-bus/bus-message.c
@@ -130,7 +130,7 @@ static void message_free(sd_bus_message *m) {
message_reset_parts(m);
if (m->release_kdbus) {
- struct kdbus_cmd_free cmd_free;
+ struct kdbus_cmd_free cmd_free = { };
cmd_free.flags = 0;
cmd_free.offset = (uint8_t *)m->kdbus - (uint8_t *)m->bus->kdbus_buffer;