From: Jérémie Galarneau Date: Mon, 1 Aug 2016 19:07:42 +0000 (-0400) Subject: Tests: Unchecked pthread_create return value X-Git-Tag: v2.9.0-rc1~79 X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=d542c0aefc94e5c5805e6158b03c9e82e53b5fd1;p=lttng-tools.git Tests: Unchecked pthread_create return value Reported-by Coverity Scan: CID 1360529 (#1 of 1): Unchecked return value (CHECKED_RETURN) Signed-off-by: Jérémie Galarneau --- diff --git a/tests/regression/kernel/select_poll_epoll.c b/tests/regression/kernel/select_poll_epoll.c index 2a69d5e45..e0e92fd38 100644 --- a/tests/regression/kernel/select_poll_epoll.c +++ b/tests/regression/kernel/select_poll_epoll.c @@ -751,7 +751,12 @@ void epoll_pwait_concurrent_munmap(void) } } stop_thread = 0; - pthread_create(&writer, NULL, &epoll_pwait_writer, (void *) epoll_event); + ret = pthread_create(&writer, NULL, &epoll_pwait_writer, + (void *) epoll_event); + if (ret != 0) { + fprintf(stderr, "[error] pthread_create\n"); + goto end; + } ret = epoll_pwait(epollfd, epoll_event, 1, 1, NULL);