X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fmanage-apps.c;h=356c147aaf83bb5c2b29f9667e8a83021f76aec2;hp=6ef0351fe8088f16b2d35cb8f0c66dca2700ea3f;hb=ea6bf30f3684cf71633cb9f2c70ea0bc22b664c4;hpb=7649924e1b3a80687c2fb79f8778e08bedb671ce diff --git a/src/bin/lttng-sessiond/manage-apps.c b/src/bin/lttng-sessiond/manage-apps.c index 6ef0351fe..356c147aa 100644 --- a/src/bin/lttng-sessiond/manage-apps.c +++ b/src/bin/lttng-sessiond/manage-apps.c @@ -123,11 +123,6 @@ static void *thread_application_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; @@ -226,13 +221,12 @@ bool launch_application_management_thread(int apps_cmd_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; @@ -251,5 +245,6 @@ bool launch_application_management_thread(int apps_cmd_pipe_read_fd) return true; error: cleanup_application_management_thread(notifiers); +error_alloc: return false; }