[FATTEN]
authorPierre Schweitzer <pierre@reactos.org>
Wed, 9 Sep 2015 07:05:17 +0000 (07:05 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Wed, 9 Sep 2015 07:05:17 +0000 (07:05 +0000)
CORE-10140

svn path=/trunk/; revision=69143

reactos/tools/fatten/fatten.c

index a64c5f9..2127722 100644 (file)
@@ -293,10 +293,13 @@ int main(int oargc, char* oargv[])
             if(!fread(buff, 512, 1, fe))
             {
                 printf("Error: unable to read boot sector from file '%s'.", argv[0]);
+                fclose(fe);
                 ret = 1;
                 goto exit;
             }
 
+            fclose(fe);
+
             NEED_MOUNT();
 
             if(disk_read(0, temp, 0, 1))
@@ -326,8 +329,6 @@ int main(int oargc, char* oargv[])
                 ret = 1;
                 goto exit;
             }
-
-            fclose(fe);
         }
         else if (strcmp(parg, "add") == 0)
         {