X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Funix.c;h=0e6c329c072c385da4e25836290f60f436ca69e5;hp=50200242529992ce4b8244d4c4d897a28d35583d;hb=246611b0dffa58fbc0e2329ddf6f9dc9d9eff7ce;hpb=fe489250ce102edf511e99669025934ec9587c63 diff --git a/src/common/unix.c b/src/common/unix.c index 502002425..0e6c329c0 100644 --- a/src/common/unix.c +++ b/src/common/unix.c @@ -15,9 +15,9 @@ #include #include #include -#include #include +#include #include #include @@ -453,6 +453,11 @@ ssize_t _lttcomm_send_payload_view_fds_unix_sock(int sock, lttng_dynamic_array_init(&raw_fds, sizeof(int), NULL); + if (fd_count < 0) { + ret = -LTTNG_ERR_INVALID; + goto end; + } + /* * Prepare a contiguous array of file descriptors to send them. *