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:
parent
cf62694ef0
commit
50563b44a2
@ -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();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user