X-Git-Url: http://git.liburcu.org/?p=lttng-ust.git;a=blobdiff_plain;f=liblttng-ust-comm%2Flttng-ust-comm.c;h=1e9972d2461f77c617c6f67864d8fe019caa2f7b;hp=6edb395f18ca32498a6d5c9c96dc6b2a23cb2737;hb=f680d83cec4c2f9c3caa6067f805a45c06f91657;hpb=2bd73a3d2ed304b036f78822aab112e6ea5bbe2b diff --git a/liblttng-ust-comm/lttng-ust-comm.c b/liblttng-ust-comm/lttng-ust-comm.c index 6edb395f..1e9972d2 100644 --- a/liblttng-ust-comm/lttng-ust-comm.c +++ b/liblttng-ust-comm/lttng-ust-comm.c @@ -377,6 +377,8 @@ ssize_t ustcomm_send_fds_unix_sock(int sock, int *fds, size_t nb_fd) msg.msg_controllen = CMSG_LEN(sizeof_fds); cmptr = CMSG_FIRSTHDR(&msg); + if (!cmptr) + return -EINVAL; cmptr->cmsg_level = SOL_SOCKET; cmptr->cmsg_type = SCM_RIGHTS; cmptr->cmsg_len = CMSG_LEN(sizeof_fds);