Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
notifiers = zmalloc(sizeof(*notifiers));
if (!notifiers) {
notifiers = zmalloc(sizeof(*notifiers));
if (!notifiers) {
}
sem_init(¬ifiers->ready, 0, 0);
}
sem_init(¬ifiers->ready, 0, 0);
return true;
error:
cleanup_agent_management_thread(notifiers);
return true;
error:
cleanup_agent_management_thread(notifiers);
notifiers = zmalloc(sizeof(*notifiers));
if (!notifiers) {
notifiers = zmalloc(sizeof(*notifiers));
if (!notifiers) {
}
sem_init(¬ifiers->ready, 0, 0);
}
sem_init(¬ifiers->ready, 0, 0);
return true;
error:
cleanup_health_management_thread(notifiers);
return true;
error:
cleanup_health_management_thread(notifiers);
struct thread_notifiers *notifiers = NULL;
struct lttng_thread *thread;
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) {
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;
goto error;
}
notifiers->quit_pipe = quit_pipe;
return true;
error:
cleanup_application_management_thread(notifiers);
return true;
error:
cleanup_application_management_thread(notifiers);
struct thread_notifiers *notifiers = NULL;
struct lttng_thread *thread;
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) {
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;
goto error;
}
notifiers->quit_pipe = quit_pipe;
return true;
error:
cleanup_consumer_management_thread(notifiers);
return true;
error:
cleanup_consumer_management_thread(notifiers);
struct thread_notifiers *notifiers = NULL;
struct lttng_thread *thread;
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) {
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;
goto error;
}
notifiers->quit_pipe = quit_pipe;
return true;
error:
cleanup_kernel_management_thread(notifiers);
return true;
error:
cleanup_kernel_management_thread(notifiers);
notifiers = zmalloc(sizeof(*notifiers));
if (!notifiers) {
notifiers = zmalloc(sizeof(*notifiers));
if (!notifiers) {
}
notifiers->apps_cmd_notify_pipe_read_fd = apps_cmd_notify_pipe_read_fd;
}
notifiers->apps_cmd_notify_pipe_read_fd = apps_cmd_notify_pipe_read_fd;
return true;
error:
cleanup_application_notification_thread(notifiers);
return true;
error:
cleanup_application_notification_thread(notifiers);
struct thread_notifiers *notifiers = NULL;
struct lttng_thread *thread;
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) {
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;
goto error;
}
notifiers->quit_pipe = quit_pipe;
return thread;
error:
cleanup_application_registration_thread(notifiers);
return thread;
error:
cleanup_application_registration_thread(notifiers);
thread = zmalloc(sizeof(*thread));
if (!thread) {
thread = zmalloc(sizeof(*thread));
if (!thread) {
}
urcu_ref_init(&thread->ref);
}
urcu_ref_init(&thread->ref);
/* Release list reference. */
lttng_thread_put(thread);
pthread_mutex_unlock(&thread_list.lock);
/* Release list reference. */
lttng_thread_put(thread);
pthread_mutex_unlock(&thread_list.lock);
/* Release initial reference. */
lttng_thread_put(thread);
/* Release initial reference. */
lttng_thread_put(thread);