]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdlft55xx.c
ADD: 'analyse chksum' added a nibble xor calc - calcSumNibbleXor
[proxmark3-svn] / client / cmdlft55xx.c
index 28149efff6f02268c7c050e20e7ea344b94aac3b..f28f84ceff0475c5206ae27d51a61f9ae5219032 100644 (file)
@@ -1491,7 +1491,10 @@ int CmdT55xxBruteForce(const char *Cmd) {
                                if (!p) {\r
                                        PrintAndLog("Cannot allocate memory for defaultKeys");\r
                                        free(keyBlock);\r
-                                       fclose(f);\r
+                                       if (f) {\r
+                                               fclose(f);\r
+                                               f = NULL;\r
+                                       }\r
                                        return 2;\r
                                }\r
                                keyBlock = p;\r
@@ -1502,8 +1505,10 @@ int CmdT55xxBruteForce(const char *Cmd) {
                        keycnt++;\r
                        memset(buf, 0, sizeof(buf));\r
                }               \r
-               fclose(f);\r
-               \r
+               if (f) {\r
+                       fclose(f);\r
+                       f = NULL;\r
+               }\r
                if (keycnt == 0) {\r
                        PrintAndLog("No keys found in file");\r
                        free(keyBlock);\r
Impressum, Datenschutz