X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fconsumer%2Fconsumer-stream.c;h=1edd908044c453ff5d436ad7da819b1b843ff5f6;hb=18acc0a479471e15fb7b7fc3ca5f38e7ce8f72d3;hp=a23322c8d84b584dd1c78f2d282063dd4d2f1a64;hpb=90c106c686bee2d1dedf1496140f9291d3b16799;p=lttng-tools.git diff --git a/src/common/consumer/consumer-stream.c b/src/common/consumer/consumer-stream.c index a23322c8d..1edd90804 100644 --- a/src/common/consumer/consumer-stream.c +++ b/src/common/consumer/consumer-stream.c @@ -670,6 +670,7 @@ struct lttng_consumer_stream *consumer_stream_create( goto error; } + stream->send_node = CDS_LIST_HEAD_INIT(stream->send_node); stream->chan = channel; stream->key = stream_key; stream->trace_chunk = trace_chunk; @@ -1059,6 +1060,8 @@ void consumer_stream_destroy(struct lttng_consumer_stream *stream, { assert(stream); + cds_list_del_init(&stream->send_node); + /* Stream is in monitor mode. */ if (stream->monitor) { struct lttng_consumer_channel *free_chan = NULL; @@ -1091,6 +1094,7 @@ void consumer_stream_destroy(struct lttng_consumer_stream *stream, * If the stream is not visible globally, this needs to be done * outside of the consumer data lock section. */ + destroy_close_stream(stream); free_chan = unref_channel(stream); }