Move the viewer stream's release of its trace chunk to the destroy
method (as opposed to the release method) as destroy is used directly
when an error occurs in the viewer stream's creation function.
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
static void viewer_stream_destroy(struct relay_viewer_stream *vstream)
{
+ lttng_trace_chunk_put(vstream->stream_file.trace_chunk);
free(vstream->path_name);
free(vstream->channel_name);
free(vstream);
stream_put(vstream->stream);
vstream->stream = NULL;
}
- lttng_trace_chunk_put(vstream->stream_file.trace_chunk);
+
call_rcu(&vstream->rcu_node, viewer_stream_destroy_rcu);
}