X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fmain.c;h=cc93da881906fb459b4199e7625aef279928c8db;hp=df4760602b5e4838f90cf124764fbbdad06d5ef4;hb=152413a01067652b58ec4e682c598396af37a01c;hpb=025faf73cdb6942ebf437dc4c4f6631f0134b128 diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index df4760602..cc93da881 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -633,7 +633,7 @@ static int update_kernel_stream(struct consumer_data *consumer_data, int fd) assert(socket->fd >= 0); pthread_mutex_lock(socket->lock); - ret = kernel_consumer_send_channel_stream(socket->fd, + ret = kernel_consumer_send_channel_stream(socket, channel, ksess); pthread_mutex_unlock(socket->lock); if (ret < 0) { @@ -1513,7 +1513,6 @@ error: health_error(&health_thread_app_reg); ERR("Health error occurred in %s", __func__); } - health_exit(&health_thread_app_reg); /* Notify that the registration thread is gone */ notify_ust_apps(0); @@ -1538,6 +1537,7 @@ error_poll_add: error_listen: error_create_poll: DBG("UST Registration thread cleanup complete"); + health_exit(&health_thread_app_reg); return NULL; } @@ -2853,6 +2853,10 @@ skip_domain: ret = LTTNG_ERR_FILTER_INVAL; goto error; } + if (cmd_ctx->lsm->u.enable.bytecode_len == 0) { + ret = LTTNG_ERR_FILTER_INVAL; + goto error; + } bytecode = zmalloc(cmd_ctx->lsm->u.enable.bytecode_len); if (!bytecode) { ret = LTTNG_ERR_FILTER_NOMEM;