Fix: protect the channel's metadata stream using the metadata cache lock
[lttng-tools.git] / src / common / consumer / consumer-metadata-cache.c
index 3211ec1e84878d7735fe2280891719fd9fd308d6..6b15375e19c27d52ae31b991d13bfc6f52838088 100644 (file)
@@ -147,7 +147,7 @@ int consumer_metadata_cache_write(struct lttng_consumer_channel *channel,
                char dummy = 'c';
 
                cache->max_offset = offset + len;
-               if (channel->monitor) {
+               if (channel->monitor && channel->metadata_stream) {
                        size_ret = lttng_write(channel->metadata_stream->ust_metadata_poll_pipe[1],
                                        &dummy, 1);
                        if (size_ret < 1) {
This page took 0.02318 seconds and 4 git commands to generate.