X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fconsumer.c;h=b6d564659c8a69cb2709e94d5026f15e7b08146c;hb=79ead7f07252097de61d6d8274d4a64232583560;hp=b593a2ae425d4b7cbb023cca272f2c268e30eeba;hpb=afccc2400dd205db3fbdb1ee42a620db1bebab86;p=lttng-tools.git diff --git a/src/common/consumer.c b/src/common/consumer.c index b593a2ae4..b6d564659 100644 --- a/src/common/consumer.c +++ b/src/common/consumer.c @@ -1758,6 +1758,12 @@ ssize_t lttng_consumer_on_read_subbuffer_splice( outfd = stream->out_fd; if (stream->index_fd >= 0) { + ret = close(stream->index_fd); + if (ret < 0) { + PERROR("Closing index"); + goto end; + } + stream->index_fd = -1; ret = index_create_file(stream->chan->pathname, stream->name, stream->uid, stream->gid, stream->chan->tracefile_size,