+static void viewer_stream_release_composite_objects(struct relay_viewer_stream *vstream)
+{
+ if (vstream->stream_file.handle) {
+ fs_handle_close(vstream->stream_file.handle);
+ vstream->stream_file.handle = nullptr;
+ }
+ if (vstream->index_file) {
+ lttng_index_file_put(vstream->index_file);
+ vstream->index_file = nullptr;
+ }
+ if (vstream->stream) {
+ stream_put(vstream->stream);
+ vstream->stream = nullptr;
+ }
+ lttng_trace_chunk_put(vstream->stream_file.trace_chunk);
+ vstream->stream_file.trace_chunk = nullptr;
+}