From f7e7554c95d31cd8adbc47c66084f671161bbcb4 Mon Sep 17 00:00:00 2001 From: Geoff McLane Date: Tue, 9 May 2017 19:24:20 +0200 Subject: [PATCH] Close the file before the _WIN32 switch --- src/tidylib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/tidylib.c b/src/tidylib.c index 25343d5..fad55e6 100755 --- a/src/tidylib.c +++ b/src/tidylib.c @@ -1077,11 +1077,12 @@ int tidyDocParseFile( TidyDocImpl* doc, ctmbstr filnam ) return status; } + fclose( fin ); + #ifdef _WIN32 return TY_(DocParseFileWithMappedFile)( doc, filnam ); #else - fclose( fin ); fin = fopen( filnam, "rb" ); #if PRESERVE_FILE_TIMES