X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fust-consumer%2Fust-consumer.c;h=2bbc3f5e4fab1ba7b89fd0820ddf93080229b15d;hb=f2ad556de9fb7e0920938f1e3d4b1fcb0709beb6;hp=89b946896fc2858844be1f63c77bbd55c9e7642a;hpb=fc6432477fe8a5d3c4494acccdbe94c5912420bb;p=lttng-tools.git diff --git a/src/common/ust-consumer/ust-consumer.c b/src/common/ust-consumer/ust-consumer.c index 89b946896..2bbc3f5e4 100644 --- a/src/common/ust-consumer/ust-consumer.c +++ b/src/common/ust-consumer/ust-consumer.c @@ -859,6 +859,13 @@ int lttng_ustconsumer_recv_cmd(struct lttng_consumer_local_data *ctx, goto end_channel_error; } + /* + * Set refcount to 1 for owner. Below, we will pass + * ownership to the consumer_thread_channel_poll() + * thread. + */ + channel->refcount = 1; + /* Build channel attributes from received message. */ attr.subbuf_size = msg.u.ask_channel.subbuf_size; attr.num_subbuf = msg.u.ask_channel.num_subbuf;