break;
case BT_SEEK_LAST:
{
- struct ctf_file_stream *cfs;
+ struct ctf_file_stream *cfs = NULL;
tc = iter->ctx->tc;
ret = seek_last_ctf_trace_collection(tc, &cfs);
- if (ret != 0)
+ if (ret != 0 || !cfs)
goto error;
/* remove all streams from the heap */
heap_free(iter->stream_heap);
break;
case BT_SEEK_TIME:
case BT_SEEK_RESTORE:
- case BT_SEEK_END:
default:
assert(0); /* Not yet defined */
}