test: silence a valgrind warning

(cherry picked from commit 39aea2a8d6)

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1375>
This commit is contained in:
Peter Hutterer 2025-11-27 09:32:13 +10:00
parent 11063aa28b
commit f2bf1d9aef

View file

@ -123,7 +123,8 @@ static void
close_pipes(int fds[_FD_LAST]) close_pipes(int fds[_FD_LAST])
{ {
for (int i = 0; i < _FD_LAST; i++) { for (int i = 0; i < _FD_LAST; i++) {
fsync(fds[i]); if (fds[i] != -1)
fsync(fds[i]);
xclose(&fds[i]); xclose(&fds[i]);
} }
} }