messaging: fix a valgrind warning on 64bit hosts zero out padding
authorStefan Metzmacher <metze@samba.org>
Sat, 15 Mar 2008 11:21:06 +0000 (12:21 +0100)
committerStefan Metzmacher <metze@samba.org>
Sat, 15 Mar 2008 11:21:06 +0000 (12:21 +0100)
metze

source/lib/messaging/messaging.c

index 6a879ab962774f8008af09b56aea34b949042b37..29d6e002477bc1376e5b1d004f88a765a4cb8bbe 100644 (file)
@@ -462,6 +462,8 @@ NTSTATUS messaging_send(struct messaging_context *msg, struct server_id server,
        rec->retries       = 0;
        rec->msg              = msg;
        rec->header           = (struct messaging_header *)rec->packet.data;
+       /* zero padding */
+       ZERO_STRUCTP(rec->header);
        rec->header->version  = MESSAGING_VERSION;
        rec->header->msg_type = msg_type;
        rec->header->from     = msg->server_id;