Mercurial > hg > nginx
diff src/os/unix/ngx_channel.c @ 5252:982678c5c270
Valgrind: another complaint about uninitialized bytes.
author | Tatsuhiko Kubo <cubicdaiya@gmail.com> |
---|---|
date | Wed, 12 Jun 2013 00:41:24 +0900 |
parents | d620f497c50f |
children | 6b479db5b52b |
line wrap: on
line diff
--- a/src/os/unix/ngx_channel.c Thu Jun 13 16:28:42 2013 +0400 +++ b/src/os/unix/ngx_channel.c Wed Jun 12 00:41:24 2013 +0900 @@ -34,6 +34,8 @@ 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;