mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
covery 265055, 265056, 265059 resource leak
This commit is contained in:
parent
9020df5b30
commit
21de7a265b
1 changed files with 5 additions and 1 deletions
|
@ -1799,6 +1799,7 @@ static int CmdHF14AMfAutoPWN(const char *Cmd) {
|
||||||
// create/initialize key storage structure
|
// create/initialize key storage structure
|
||||||
int32_t res = initSectorTable(&e_sector, sectors_cnt);
|
int32_t res = initSectorTable(&e_sector, sectors_cnt);
|
||||||
if (res != sectors_cnt) {
|
if (res != sectors_cnt) {
|
||||||
|
free(e_sector);
|
||||||
return PM3_EMALLOC;
|
return PM3_EMALLOC;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3644,8 +3645,10 @@ static int CmdHF14AMfEKeyPrn(const char *Cmd) {
|
||||||
|
|
||||||
// create/initialize key storage structure
|
// create/initialize key storage structure
|
||||||
int32_t res = initSectorTable(&e_sector, sectors_cnt);
|
int32_t res = initSectorTable(&e_sector, sectors_cnt);
|
||||||
if (res != sectors_cnt)
|
if (res != sectors_cnt) {
|
||||||
|
free(e_sector);
|
||||||
return PM3_EMALLOC;
|
return PM3_EMALLOC;
|
||||||
|
}
|
||||||
|
|
||||||
// read UID from EMUL
|
// read UID from EMUL
|
||||||
if (mfEmlGetMem(data, 0, 1) != PM3_SUCCESS) {
|
if (mfEmlGetMem(data, 0, 1) != PM3_SUCCESS) {
|
||||||
|
@ -4083,6 +4086,7 @@ static int CmdHF14AMfCSave(const char *Cmd) {
|
||||||
PacketResponseNG resp;
|
PacketResponseNG resp;
|
||||||
if (!WaitForResponseTimeout(CMD_ACK, &resp, 1500)) {
|
if (!WaitForResponseTimeout(CMD_ACK, &resp, 1500)) {
|
||||||
PrintAndLogEx(WARNING, "iso14443a card select failed");
|
PrintAndLogEx(WARNING, "iso14443a card select failed");
|
||||||
|
free(dump);
|
||||||
return PM3_ESOFT;
|
return PM3_ESOFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue