1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-11-27 05:49:24 +00:00

Close any open files we have

This commit is contained in:
Peter Evans 2017-12-08 17:09:58 -06:00
parent cf62694ef0
commit 50563b44a2

View File

@ -42,6 +42,15 @@ init(int argc, char **argv)
static void
finish()
{
// Close any file sources we had opened
for (int i = 1; i <= OPTION_MAX_DISKS; i++) {
FILE *stream = option_get_input(i);
if (stream != NULL) {
fclose(stream);
}
}
log_close();
}