mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-10 18:24:27 +08:00
coverity 226277 - fix resource leak
This commit is contained in:
parent
cd0a47308d
commit
08e62afc59
1 changed files with 2 additions and 0 deletions
|
@ -664,10 +664,12 @@ static bool readKeyFile(uint8_t *key, size_t keylen) {
|
|||
}
|
||||
|
||||
if (keylen != len) {
|
||||
free(keyptr);
|
||||
return false;
|
||||
}
|
||||
|
||||
memcpy(key, keyptr, keylen);
|
||||
free(keyptr);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue