]> sjero.net Git - wget/blobdiff - util/trunc.c
trunc: check for `close'-ing the fd errors.
[wget] / util / trunc.c
index 55cb19d3175a0524199643f25ee617ae2fedb739..a5f1dcb07a5157fcd3fc2a740eaad7dba0e2df60 100644 (file)
@@ -128,5 +128,11 @@ main (int argc, char *argv[])
       exit (EXIT_FAILURE);
     }
 
+  if (close (fd) < 0)
+    {
+      perror (PROGRAM_NAME ": close");
+      exit (EXIT_FAILURE);
+    }
+
   return 0;
 }