Fix: missing unmap in test error handling
[lttng-tools.git] / tests / regression / kernel / select_poll_epoll.c
index e0e92fd381c8980499059aea44c77525b2922fd2..3b98ab415c9c9485cf6c255d77c203ee5f0bcc4b 100644 (file)
@@ -655,7 +655,11 @@ void stress_ppoll(int *fds, int value)
                do_ppoll(fds, ufds);
        }
        stop_thread = 1;
-       pthread_join(writer, NULL);
+       ret = pthread_join(writer, NULL);
+       if (ret) {
+               fprintf(stderr, "[error] pthread_join\n");
+               goto end;
+       }
 end:
        return;
 }
@@ -755,7 +759,7 @@ void epoll_pwait_concurrent_munmap(void)
                        (void *) epoll_event);
        if (ret != 0) {
                fprintf(stderr, "[error] pthread_create\n");
-               goto end;
+               goto end_unmap;
        }
 
        ret = epoll_pwait(epollfd, epoll_event, 1, 1, NULL);
@@ -773,8 +777,11 @@ void epoll_pwait_concurrent_munmap(void)
        }
 
        stop_thread = 1;
-       pthread_join(writer, NULL);
-
+       ret = pthread_join(writer, NULL);
+       if (ret) {
+               fprintf(stderr, "[error] pthread_join\n");
+               goto end_unmap;
+       }
 end_unmap:
        for (i = 0; i < MAX_FDS; i++) {
                ret = close(fds[i]);
This page took 0.024489 seconds and 4 git commands to generate.