Fix: consumerd: use-after-free of metadata bucket
[lttng-tools.git] / src / common / consumer / consumer-stream.c
index 0f60dfd08e3a3e1b264d445698d8ace2e727ec0d..c334edb154dfa78a49fbfd3f2189f42011f40fad 100644 (file)
@@ -517,6 +517,8 @@ struct lttng_consumer_stream *consumer_stream_create(
                goto error;
        }
 
+       stream->send_node = (typeof(stream->send_node))
+                       CDS_LIST_HEAD_INIT(stream->send_node);
        stream->chan = channel;
        stream->key = stream_key;
        stream->trace_chunk = trace_chunk;
@@ -889,6 +891,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;
This page took 0.02454 seconds and 5 git commands to generate.