projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Version 2.5.7
[lttng-ust.git]
/
liblttng-ust-comm
/
lttng-ust-comm.c
diff --git
a/liblttng-ust-comm/lttng-ust-comm.c
b/liblttng-ust-comm/lttng-ust-comm.c
index 751ad2e3cf2add1ffd805c9ca4df802034e793b1..1e9972d2461f77c617c6f67864d8fe019caa2f7b 100644
(file)
--- 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);
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);
cmptr->cmsg_level = SOL_SOCKET;
cmptr->cmsg_type = SCM_RIGHTS;
cmptr->cmsg_len = CMSG_LEN(sizeof_fds);
@@
-390,7
+392,7
@@
ssize_t ustcomm_send_fds_unix_sock(int sock, int *fds, size_t nb_fd)
msg.msg_iovlen = 1;
do {
msg.msg_iovlen = 1;
do {
- ret = sendmsg(sock, &msg,
0
);
+ ret = sendmsg(sock, &msg,
MSG_NOSIGNAL
);
} while (ret < 0 && errno == EINTR);
if (ret < 0) {
/*
} while (ret < 0 && errno == EINTR);
if (ret < 0) {
/*
This page took
0.022919 seconds
and
4
git commands to generate.