X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fsessiond-comm%2Funix.c;h=e2d0def8e842f2eb156d82178a71ca3be148f96c;hp=77a6013f0244572b2c2bb30ae054959db2cdf5c4;hb=8bbffd547a5d7ce11413aff2082f97aafe9d7a51;hpb=1d8d032800b64945d90c7b5a7b8e9316e733a4b1 diff --git a/src/common/sessiond-comm/unix.c b/src/common/sessiond-comm/unix.c index 77a6013f0..e2d0def8e 100644 --- a/src/common/sessiond-comm/unix.c +++ b/src/common/sessiond-comm/unix.c @@ -396,10 +396,11 @@ ssize_t lttcomm_send_creds_unix_sock(int sock, void *buf, size_t len) size_t sizeof_cred = sizeof(lttng_sock_cred); char anc_buf[CMSG_SPACE(sizeof_cred)]; lttng_sock_cred *creds; + + memset(anc_buf, 0, CMSG_SPACE(sizeof_cred) * sizeof(char)); #endif /* __linux__ */ memset(&msg, 0, sizeof(msg)); - memset(anc_buf, 0, CMSG_SPACE(sizeof_cred) * sizeof(char)); iov[0].iov_base = buf; iov[0].iov_len = len;