]> git.neil.brown.name Git - history.git/commitdiff
kbuild: scripts/fixdep.c doesn't close files when finished
authorKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Tue, 11 Feb 2003 08:54:42 +0000 (02:54 -0600)
committerKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Tue, 11 Feb 2003 08:54:42 +0000 (02:54 -0600)
From Chris Wedgwood:

> fixdep doesn't close files when finished with them... normally this
> doesn't matter unless you have strict ulimits in place.
>
> Trivial fix is:

scripts/fixdep.c

index a14e0bfd326ab4ca209701ed63422fa914c33582..ef292f9d49a7277d06247e4df519cbea1341888c 100644 (file)
@@ -277,6 +277,8 @@ void do_config_file(char *filename)
        parse_config_file(map, st.st_size);
 
        munmap(map, st.st_size);
+
+       close(fd);
 }
 
 void parse_dep_file(void *map, size_t len)
@@ -346,6 +348,8 @@ void print_deps(void)
        parse_dep_file(map, st.st_size);
 
        munmap(map, st.st_size);
+
+       close(fd);
 }
 
 void traps(void)