mirror of
https://github.com/pevans/erc-c.git
synced 2025-02-25 14:29:13 +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
|
static void
|
||||||
finish()
|
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();
|
log_close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user