mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
fix double-free
This commit is contained in:
parent
ec6f9e78b6
commit
145ee3baa7
1 changed files with 3 additions and 0 deletions
|
@ -1613,6 +1613,7 @@ static int mfu_dump_tag(uint16_t pages, void **pdata, uint16_t *len) {
|
|||
if (WaitForResponseTimeout(CMD_ACK, &resp, 2500) == false) {
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
free(*pdata);
|
||||
*pdata = NULL;
|
||||
res = PM3_ETIMEOUT;
|
||||
goto out;
|
||||
}
|
||||
|
@ -1620,6 +1621,7 @@ static int mfu_dump_tag(uint16_t pages, void **pdata, uint16_t *len) {
|
|||
if (resp.oldarg[0] != 1) {
|
||||
PrintAndLogEx(WARNING, "Failed reading card");
|
||||
free(*pdata);
|
||||
*pdata = NULL;
|
||||
res = PM3_ESOFT;
|
||||
goto out;
|
||||
}
|
||||
|
@ -1635,6 +1637,7 @@ static int mfu_dump_tag(uint16_t pages, void **pdata, uint16_t *len) {
|
|||
if (GetFromDevice(BIG_BUF, *pdata, buffer_size, startindex, NULL, 0, NULL, 2500, false) == false) {
|
||||
PrintAndLogEx(WARNING, "command execution time out");
|
||||
free(*pdata);
|
||||
*pdata = NULL;
|
||||
res = PM3_ETIMEOUT;
|
||||
goto out;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue