- num_to_bytes(key64, 6, keyBlock);\r
- key64 = 0;\r
- if (!mfCheckKeys(statelists[0].blockNo, statelists[0].keyType, false, 1, keyBlock, &key64)) {\r
- num_to_bytes(key64, 6, resultKey);\r
- break;\r
+ num_to_bytes(key64, 6, resultKey);\r
+\r
+ if (!mfCheckKeys(statelists[0].blockNo, statelists[0].keyType, false, 1, resultKey, &key64)) {\r
+ free(statelists[0].head.slhead);\r
+ free(statelists[1].head.slhead);\r
+ PrintAndLog("UID: %08x target block:%3u key type: %c -- Found key [%012"llx"]", uid, (uint16_t)resp.arg[2] & 0xff, (resp.arg[2] >> 8)?'B':'A', key64);\r
+ return -5;\r