}
case LTTNG_VIEWER_SEEK_LAST:
vstream->current_tracefile_id =
- tracefile_array_get_file_index_head(stream->tfa);
+ tracefile_array_get_read_file_index_head(stream->tfa);
/*
* We seek at the very end of each stream, awaiting for
* a future packet to eventually come in.
if (vstream) {
viewer_stream_destroy(vstream);
}
- if (viewer_trace_chunk) {
+ if (viewer_trace_chunk && acquired_reference) {
lttng_trace_chunk_put(viewer_trace_chunk);
}
return NULL;