mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-25 17:38:09 +08:00
fix coverity CID 93584
This commit is contained in:
parent
2d5aaaa335
commit
cd965a6d34
1 changed files with 2 additions and 1 deletions
|
@ -1180,12 +1180,14 @@ static int CmdHFiClassDecrypt(const char *Cmd) {
|
|||
res = loadFile_safe(ICLASS_DECRYPTION_BIN, "", (void **)&keyptr, &keylen);
|
||||
if (res != PM3_SUCCESS) {
|
||||
PrintAndLogEx(INFO, "Couldn't find any decryption methods");
|
||||
free(decrypted);
|
||||
return PM3_EINVARG;
|
||||
}
|
||||
|
||||
if (keylen != 16) {
|
||||
PrintAndLogEx(ERR, "Failed to load transport key from file");
|
||||
free(keyptr);
|
||||
free(decrypted);
|
||||
return PM3_EINVARG;
|
||||
}
|
||||
memcpy(key, keyptr, sizeof(key));
|
||||
|
@ -1328,7 +1330,6 @@ static int CmdHFiClassDecrypt(const char *Cmd) {
|
|||
}
|
||||
|
||||
PrintAndLogEx(INFO, "-----------------------------------------------------------------");
|
||||
|
||||
free(decrypted);
|
||||
free(fptr);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue