mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-20 12:07:05 +08:00
fix coverty 267216 resource leak
This commit is contained in:
parent
8617acee71
commit
bf975af358
1 changed files with 3 additions and 0 deletions
|
@ -676,6 +676,7 @@ int mfStaticNested(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBl
|
|||
//flush queue
|
||||
while (kbd_enter_pressed()) {
|
||||
SendCommandNG(CMD_BREAK_LOOP, NULL, 0);
|
||||
free(mem);
|
||||
return PM3_EOPABORTED;
|
||||
}
|
||||
|
||||
|
@ -695,6 +696,7 @@ int mfStaticNested(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBl
|
|||
res = flashmem_spiffs_load(destfn, mem, 5 + (chunk * 6) );
|
||||
if (res != PM3_SUCCESS) {
|
||||
PrintAndLogEx(WARNING, "SPIFFS upload failed");
|
||||
free(mem);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -717,6 +719,7 @@ int mfStaticNested(uint8_t blockNo, uint8_t keyType, uint8_t *key, uint8_t trgBl
|
|||
);
|
||||
return PM3_SUCCESS;
|
||||
} else if (res == PM3_ETIMEOUT || res == PM3_EOPABORTED) {
|
||||
free(mem);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue