diff options
Diffstat (limited to 'src/nxt_socketpair.c')
-rw-r--r-- | src/nxt_socketpair.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/nxt_socketpair.c b/src/nxt_socketpair.c index e1c303dd..efa0f486 100644 --- a/src/nxt_socketpair.c +++ b/src/nxt_socketpair.c @@ -188,6 +188,10 @@ nxt_sendmsg(nxt_socket_t s, nxt_fd_t fd, nxt_iobuf_t *iob, nxt_uint_t niob) msg.msg_control = (caddr_t) &cmsg; msg.msg_controllen = sizeof(cmsg); +#if (NXT_VALGRIND) + nxt_memzero(&cmsg, sizeof(cmsg)); +#endif + cmsg.cm.cmsg_len = CMSG_LEN(sizeof(int)); cmsg.cm.cmsg_level = SOL_SOCKET; cmsg.cm.cmsg_type = SCM_RIGHTS; @@ -231,6 +235,10 @@ nxt_recvmsg(nxt_socket_t s, nxt_fd_t *fd, nxt_iobuf_t *iob, nxt_uint_t niob) *fd = -1; +#if (NXT_VALGRIND) + nxt_memzero(&cmsg, sizeof(cmsg)); +#endif + n = recvmsg(s, &msg, 0); if (n > 0 |