From: David Herrmann Date: Thu, 11 Dec 2014 09:45:58 +0000 (+0100) Subject: bus: zero cmd_free before passing to ioctl X-Git-Tag: v219~1066 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=055b27f29484b625e03706319c918e3a644e00b9;p=platform%2Fupstream%2Fsystemd.git 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. --- diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c index 0803999..6bf39ce 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;