]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - client/cmdhflist.c
Mfp read plain (#704)
[proxmark3-svn] / client / cmdhflist.c
index c87aa23779724bbf4206afb231dc50f304558497..5538b6fb8a50ff71b2b9d2127cf72824c33ceaca 100644 (file)
@@ -559,8 +559,10 @@ bool NestedCheckKey(uint64_t key, TAuthData *ad, uint8_t *cmd, uint8_t cmdsize,
        uint32_t ar1 = crypto1_word(pcs, 0, 0) ^ ad->ar_enc;
        uint32_t at1 = crypto1_word(pcs, 0, 0) ^ ad->at_enc;
 
-       if (!(ar == ar1 && at == at1 && NTParityChk(ad, nt1)))
+       if (!(ar == ar1 && at == at1 && NTParityChk(ad, nt1))) {
+               crypto1_destroy(pcs);
                return false;
+       }
 
        memcpy(buf, cmd, cmdsize);
        mf_crypto1_decrypt(pcs, buf, cmdsize, 0);
Impressum, Datenschutz