aboutsummaryrefslogtreecommitdiff
path: root/modutils
diff options
context:
space:
mode:
Diffstat (limited to 'modutils')
-rw-r--r--modutils/modprobe-small.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c
index 8ef9101e7..53b7c9468 100644
--- a/modutils/modprobe-small.c
+++ b/modutils/modprobe-small.c
@@ -384,11 +384,7 @@ static void write_out_dep_bb(int fd)
FILE *fp;
/* We want good error reporting. fdprintf is not good enough. */
- fp = fdopen(fd, "w");
- if (!fp) {
- close(fd);
- goto err;
- }
+ fp = xfdopen_for_write(fd);
i = 0;
while (modinfo[i].pathname) {
fprintf(fp, "%s%s%s\n" "%s%s\n",