+ /* Empty no monitor streams list. */
+ if (!channel->monitor) {
+ struct lttng_consumer_stream *stream, *stmp;
+
+ /*
+ * So, these streams are not visible to any data thread. This is why we
+ * close and free them because they were never added to any data
+ * structure apart from this one.
+ */
+ cds_list_for_each_entry_safe(stream, stmp,
+ &channel->stream_no_monitor_list.head, no_monitor_node) {
+ cds_list_del(&stream->no_monitor_node);
+ /* Close everything in that stream. */
+ consumer_stream_close(stream);
+ /* Free the ressource. */
+ consumer_stream_free(stream);
+ }
+ }
+