notifiers = zmalloc(sizeof(*notifiers));
if (!notifiers) {
- goto error;
+ goto error_alloc;
}
sem_init(¬ifiers->ready, 0, 0);
return true;
error:
cleanup_agent_management_thread(notifiers);
+error_alloc:
return false;
}
notifiers = zmalloc(sizeof(*notifiers));
if (!notifiers) {
- goto error;
+ goto error_alloc;
}
sem_init(¬ifiers->ready, 0, 0);
return true;
error:
cleanup_health_management_thread(notifiers);
+error_alloc:
return false;
}
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;
return true;
error:
cleanup_application_management_thread(notifiers);
+error_alloc:
return false;
}
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;
return true;
error:
cleanup_consumer_management_thread(notifiers);
+error_alloc:
return false;
}
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;
return true;
error:
cleanup_kernel_management_thread(notifiers);
+error_alloc:
return false;
}
notifiers = zmalloc(sizeof(*notifiers));
if (!notifiers) {
- goto error;
+ goto error_alloc;
}
notifiers->apps_cmd_notify_pipe_read_fd = apps_cmd_notify_pipe_read_fd;
return true;
error:
cleanup_application_notification_thread(notifiers);
+error_alloc:
return false;
}
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;
return thread;
error:
cleanup_application_registration_thread(notifiers);
+error_alloc:
return NULL;
}
thread = zmalloc(sizeof(*thread));
if (!thread) {
- goto error;
+ goto error_alloc;
}
urcu_ref_init(&thread->ref);
/* Release list reference. */
lttng_thread_put(thread);
pthread_mutex_unlock(&thread_list.lock);
-error:
/* Release initial reference. */
lttng_thread_put(thread);
+error_alloc:
return NULL;
}