Don't use xclose() in splice_fd_to_stdinout()
Some checks failed
build / bcachefs-tools-deb (ubuntu-22.04) (push) Waiting to run
build / bcachefs-tools-deb (ubuntu-24.04) (push) Waiting to run
build / bcachefs-tools-rpm (push) Waiting to run
build / bcachefs-tools-msrv (push) Waiting to run
Nix Flake actions / nix-matrix (push) Waiting to run
Nix Flake actions / ${{ matrix.name }} (${{ matrix.system }}) (push) Blocked by required conditions
update-flake-lock / lockfile (push) Has been cancelled

The splice fd might have been closed, and a double-close here shouldn't
be a concern because we're not doing any interesting multithreaded
things and it's local to this function.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet 2025-04-29 13:33:29 -04:00
parent 2b226902f9
commit 5f46c4b522

View File

@ -86,7 +86,7 @@ static int splice_fd_to_stdinout(int fd)
stdin_closed = true;
}
xclose(fd);
close(fd);
return 0;
}