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)
384 FILE *fp; 384 FILE *fp;
385 385
386 /* We want good error reporting. fdprintf is not good enough. */ 386 /* We want good error reporting. fdprintf is not good enough. */
387 fp = fdopen(fd, "w"); 387 fp = xfdopen_for_write(fd);
388 if (!fp) {
389 close(fd);
390 goto err;
391 }
392 i = 0; 388 i = 0;
393 while (modinfo[i].pathname) { 389 while (modinfo[i].pathname) {
394 fprintf(fp, "%s%s%s\n" "%s%s\n", 390 fprintf(fp, "%s%s%s\n" "%s%s\n",