Fix memory leak, use COUNT_OF macro

This commit is contained in:
noproto 2024-10-09 15:51:21 -04:00
parent 56febb12b1
commit b843856976
2 changed files with 2 additions and 2 deletions

View File

@ -151,6 +151,7 @@ static void nfc_scene_mf_classic_dict_attack_prepare_view(NfcApp* instance) {
if(!keys_dict_check_presence(furi_string_get_cstr(cuid_dict_path))) { if(!keys_dict_check_presence(furi_string_get_cstr(cuid_dict_path))) {
state = DictAttackStateUserDictInProgress; state = DictAttackStateUserDictInProgress;
furi_string_free(cuid_dict_path);
break; break;
} }

View File

@ -20,8 +20,7 @@ const MfClassicBackdoorKeyPair mf_classic_backdoor_keys[] = {
{{{0xa3, 0x16, 0x67, 0xa8, 0xce, 0xc1}}, MfClassicBackdoorAuth1}, // Fudan, Infineon, NXP {{{0xa3, 0x16, 0x67, 0xa8, 0xce, 0xc1}}, MfClassicBackdoorAuth1}, // Fudan, Infineon, NXP
{{{0x51, 0x8b, 0x33, 0x54, 0xe7, 0x60}}, MfClassicBackdoorAuth2}, // Fudan {{{0x51, 0x8b, 0x33, 0x54, 0xe7, 0x60}}, MfClassicBackdoorAuth2}, // Fudan
}; };
const size_t mf_classic_backdoor_keys_count = const size_t mf_classic_backdoor_keys_count = COUNT_OF(mf_classic_backdoor_keys);
sizeof(mf_classic_backdoor_keys) / sizeof(mf_classic_backdoor_keys[0]);
const uint16_t valid_sums[] = const uint16_t valid_sums[] =
{0, 32, 56, 64, 80, 96, 104, 112, 120, 128, 136, 144, 152, 160, 176, 192, 200, 224, 256}; {0, 32, 56, 64, 80, 96, 104, 112, 120, 128, 136, 144, 152, 160, 176, 192, 200, 224, 256};