Close some file descriptors that were left dangling before

This commit is contained in:
Eric Fischer
2016-04-05 14:07:24 -07:00
parent b10b436ac9
commit 4a572b810b
2 changed files with 54 additions and 45 deletions
+11
View File
@@ -1343,6 +1343,17 @@ int traverse_zooms(int *geomfd, off_t *geom_size, char *metabase, char *stringpo
}
}
int j;
for (j = 0; j < TEMP_FILES; j++) {
// Can be < 0 if there is only one source file, at z0
if (geomfd[j] >= 0) {
if (close(geomfd[j]) != 0) {
perror("close geom");
exit(EXIT_FAILURE);
}
}
}
if (!quiet) {
fprintf(stderr, "\n");
}