ERR("Failed to get the current timestamp");
goto end;
}
- lttng_ustconsumer_flush_buffer(stream, 1);
+ ret = lttng_ustconsumer_flush_buffer(stream, 1);
+ if (ret < 0) {
+ ERR("Failed to flush buffer while flushing index");
+ goto end;
+ }
ret = lttng_ustconsumer_take_snapshot(stream);
if (ret < 0) {
if (ret != -EAGAIN) {