diff options
Diffstat (limited to 'src/os/unix/ngx_channel.c')
-rw-r--r-- | src/os/unix/ngx_channel.c | 2 |
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; |