X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fmanage-kernel.c;h=f656c9f5cc6fcdc1e4b16219d22a7c76c9a70592;hb=208ddc0608797ba50c3ce007ba7b4f887e83d87c;hp=56bc0a93ca6147807d02059058daa2b23ae4a0e5;hpb=0318876b646d8f16bf063a59e157172739ca7899;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/manage-kernel.c b/src/bin/lttng-sessiond/manage-kernel.c index 56bc0a93c..f656c9f5c 100644 --- a/src/bin/lttng-sessiond/manage-kernel.c +++ b/src/bin/lttng-sessiond/manage-kernel.c @@ -267,11 +267,6 @@ static void *thread_kernel_management(void *data) health_code_update(); - if (!revents) { - /* No activity for this FD (poll implementation). */ - continue; - } - if (pollfd == quit_pipe_read_fd) { err = 0; goto exit; @@ -347,13 +342,12 @@ bool launch_kernel_management_thread(int kernel_poll_pipe_read_fd) struct thread_notifiers *notifiers = NULL; struct lttng_thread *thread; - quit_pipe = lttng_pipe_open(FD_CLOEXEC); - if (!quit_pipe) { - goto error; - } - notifiers = zmalloc(sizeof(*notifiers)); if (!notifiers) { + goto error_alloc; + } + quit_pipe = lttng_pipe_open(FD_CLOEXEC); + if (!quit_pipe) { goto error; } notifiers->quit_pipe = quit_pipe; @@ -371,5 +365,6 @@ bool launch_kernel_management_thread(int kernel_poll_pipe_read_fd) return true; error: cleanup_kernel_management_thread(notifiers); +error_alloc: return false; }