aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTatsuhiko Kubo <cubicdaiya@gmail.com>2013-06-12 00:41:24 +0900
committerTatsuhiko Kubo <cubicdaiya@gmail.com>2013-06-12 00:41:24 +0900
commitc974bd793685a3c820e3099b0417f8876cbaca96 (patch)
tree40b79c90b449d2bf8858e3cfbfa5d1f44c261d26
parent420e41ef0972a4c8f91f8200fff04fbc4aee0a4b (diff)
downloadnginx-c974bd793685a3c820e3099b0417f8876cbaca96.tar.gz
nginx-c974bd793685a3c820e3099b0417f8876cbaca96.zip
Valgrind: another complaint about uninitialized bytes.
-rw-r--r--src/os/unix/ngx_channel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/os/unix/ngx_channel.c b/src/os/unix/ngx_channel.c
index 29c69da40..536a9ed4b 100644
--- a/src/os/unix/ngx_channel.c
+++ b/src/os/unix/ngx_channel.c
@@ -34,6 +34,8 @@ ngx_write_channel(ngx_socket_t s, ngx_channel_t *ch, size_t size,
msg.msg_control = (caddr_t) &cmsg;
msg.msg_controllen = sizeof(cmsg);
+ ngx_memzero(&cmsg, sizeof(cmsg));
+
cmsg.cm.cmsg_len = CMSG_LEN(sizeof(int));
cmsg.cm.cmsg_level = SOL_SOCKET;
cmsg.cm.cmsg_type = SCM_RIGHTS;