--- a\srcscintilla\iup_scintilladlg.c	Wed Oct 11 18:07:18 2017
+++ b\srcscintilla\iup_scintilladlg.c	Fri Jan 12 17:12:37 2018
@@ -490,8 +490,10 @@
   size = ftell(file);
   fseek(file, 0, SEEK_SET);
 
-  if (size == 0)
-    return NULL;
+  if (size == 0) {
+     fclose(file);
+     return NULL;
+  }
 
   /* allocate memory for the file contents + nul terminator */
   str = malloc(size + 1);
