Fix: consumerd: use-after-free of metadata bucket
[lttng-tools.git] / src / common / consumer / consumer-stream.cpp
index 479667209e6600d05866346de93cf9340b1a83aa..c24ea6bca60762dcab04d8ddc147c7608276c60e 100644 (file)
@@ -669,6 +669,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;
@@ -1060,6 +1061,8 @@ void consumer_stream_destroy(struct lttng_consumer_stream *stream,
 {
        LTTNG_ASSERT(stream);
 
+       cds_list_del_init(&stream->send_node);
+
        /* Stream is in monitor mode. */
        if (stream->monitor) {
                struct lttng_consumer_channel *free_chan = NULL;
This page took 0.024264 seconds and 4 git commands to generate.