X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fmanage-kernel.c;h=34887d7b1d12db660122b9cb3eedef1756b5073f;hp=56bc0a93ca6147807d02059058daa2b23ae4a0e5;hb=21fa020ee12d44632c5efde063869d542897bdd1;hpb=b0a23296344e57bd2e48e62ec2d7e0d8a38661bb diff --git a/src/bin/lttng-sessiond/manage-kernel.c b/src/bin/lttng-sessiond/manage-kernel.c index 56bc0a93c..34887d7b1 100644 --- a/src/bin/lttng-sessiond/manage-kernel.c +++ b/src/bin/lttng-sessiond/manage-kernel.c @@ -347,13 +347,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 +370,6 @@ bool launch_kernel_management_thread(int kernel_poll_pipe_read_fd) return true; error: cleanup_kernel_management_thread(notifiers); +error_alloc: return false; }