diff --git a/tests/zfs-tests/cmd/mmapwrite/mmapwrite.c b/tests/zfs-tests/cmd/mmapwrite/mmapwrite.c index baf9788ed..438cba369 100644 --- a/tests/zfs-tests/cmd/mmapwrite/mmapwrite.c +++ b/tests/zfs-tests/cmd/mmapwrite/mmapwrite.c @@ -86,6 +86,10 @@ normal_writer(void *filename) if (buf) { free(buf); } + + if (close(fd) != 0) + err(1, "failed to close file"); + return (NULL); }