]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhfmf.c
Minor refactoring
[proxmark3-svn] / client / cmdhfmf.c
index 66c0b25d1d97f3f1b32c870929e54feb779df4b8..aae6290d066697e676383308713afe66273722ad 100644 (file)
@@ -662,6 +662,8 @@ int CmdHF14AMfRestore(const char *Cmd)
        for (sectorNo = 0; sectorNo < numSectors; sectorNo++) {\r
                if (fread(keyA[sectorNo], 1, 6, fkeys) == 0) {\r
                        PrintAndLog("File reading error (dumpkeys.bin).");\r
+\r
+                       fclose(fkeys);\r
                        return 2;\r
                }\r
        }\r
@@ -669,6 +671,7 @@ int CmdHF14AMfRestore(const char *Cmd)
        for (sectorNo = 0; sectorNo < numSectors; sectorNo++) {\r
                if (fread(keyB[sectorNo], 1, 6, fkeys) == 0) {\r
                        PrintAndLog("File reading error (dumpkeys.bin).");\r
+                       fclose(fkeys);\r
                        return 2;\r
                }\r
        }\r
Impressum, Datenschutz