Fix: remove one too many metadata refcount increment
[lttng-tools.git] / src / common / kernel-consumer / kernel-consumer.c
index f3a3a22b55a230a427bad1fe7c7cb844de236d8a..c0d56171c89f5224f397a347c7774d54d9d32db0 100644 (file)
@@ -255,6 +255,12 @@ int lttng_kconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
                new_stream->chan = channel;
                new_stream->wait_fd = fd;
 
+               /*
+                * We've just assigned the channel to the stream so increment the
+                * refcount right now.
+                */
+               uatomic_inc(&new_stream->chan->refcount);
+
                /*
                 * The buffer flush is done on the session daemon side for the kernel
                 * so no need for the stream "hangup_flush_done" variable to be
This page took 0.026809 seconds and 5 git commands to generate.