mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
fix coverity 290268
This commit is contained in:
parent
e42e8e4c92
commit
cff9e2381d
1 changed files with 3 additions and 1 deletions
|
@ -515,7 +515,6 @@ static char *GenerateFilename(const char *prefix, const char *suffix) {
|
||||||
|
|
||||||
static int32_t initSectorTable(sector_t **src, int32_t items) {
|
static int32_t initSectorTable(sector_t **src, int32_t items) {
|
||||||
|
|
||||||
// initialize storage
|
|
||||||
(*src) = calloc(items, sizeof(sector_t));
|
(*src) = calloc(items, sizeof(sector_t));
|
||||||
|
|
||||||
if (*src == NULL)
|
if (*src == NULL)
|
||||||
|
@ -3144,6 +3143,7 @@ void readerAttack(sector_t *k_sector, uint8_t k_sectorsCount, nonces_t data, boo
|
||||||
if (k_sector == NULL) {
|
if (k_sector == NULL) {
|
||||||
int32_t res = initSectorTable(&k_sector, k_sectorsCount);
|
int32_t res = initSectorTable(&k_sector, k_sectorsCount);
|
||||||
if (res != k_sectorsCount) {
|
if (res != k_sectorsCount) {
|
||||||
|
free(k_sector);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3175,6 +3175,8 @@ void readerAttack(sector_t *k_sector, uint8_t k_sectorsCount, nonces_t data, boo
|
||||||
mfEmlSetMem(memBlock, (sector * 4) + 3, 1);
|
mfEmlSetMem(memBlock, (sector * 4) + 3, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(k_sector);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int CmdHF14AMfSim(const char *Cmd) {
|
static int CmdHF14AMfSim(const char *Cmd) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue