X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=liblttng-ust-comm%2Flttng-ust-comm.c;h=d213770f7a25f69059810d14d5f12569636cba2b;hb=34daae3e48423fc35b363e19136e324f9e31b05a;hp=bbc59fc2f986b26bd582212005b0e48c60f3a0ec;hpb=2deddc6f7fde7bc9d1f6abc77217649e22a0c78c;p=deliverable%2Flttng-ust.git diff --git a/liblttng-ust-comm/lttng-ust-comm.c b/liblttng-ust-comm/lttng-ust-comm.c index bbc59fc2..d213770f 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);