coverity fixes

This commit is contained in:
iceman1001 2021-02-23 18:23:53 +01:00
parent a9e3c2779e
commit 6d329a0462

View file

@ -956,6 +956,7 @@ static int CmdHFiClassDecrypt(const char *Cmd) {
if (keylen != 16) {
PrintAndLogEx(ERR, "Failed to load transport key from file");
free(keyptr);
return PM3_EINVARG;
}
memcpy(key, keyptr, sizeof(key));
@ -1175,6 +1176,7 @@ static int CmdHFiClassEncryptBlk(const char *Cmd) {
if (keylen != 16) {
PrintAndLogEx(ERR, "Failed to load transport key from file");
free(keyptr);
return PM3_EINVARG;
}
memcpy(key, keyptr, sizeof(key));