summaryrefslogtreecommitdiffstats
path: root/sys-utils/fallocate.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys-utils/fallocate.c')
-rw-r--r--sys-utils/fallocate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys-utils/fallocate.c b/sys-utils/fallocate.c
index ff0f9e6e1..6a876736a 100644
--- a/sys-utils/fallocate.c
+++ b/sys-utils/fallocate.c
@@ -168,6 +168,7 @@ int main(int argc, char **argv)
err(EXIT_FAILURE, _("%s: fallocate failed"), fname);
}
- close(fd);
+ if (close_fd(fd) != 0)
+ err(EXIT_FAILURE, _("write failed: %s"), fname);
return EXIT_SUCCESS;
}