mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
fix few mem leaks
This commit is contained in:
parent
78c153fe74
commit
1f364106ce
14 changed files with 31 additions and 15 deletions
|
@ -217,16 +217,14 @@ static int CmdPyramidClone(const char *Cmd) {
|
|||
|
||||
char cmdp = tolower(param_getchar(Cmd, 0));
|
||||
if (strlen(Cmd) == 0 || cmdp == 'h') return usage_lf_pyramid_clone();
|
||||
|
||||
uint32_t facilitycode = 0, cardnumber = 0, fc = 0, cn = 0;
|
||||
if (sscanf(Cmd, "%u %u", &fc, &cn) != 2) return usage_lf_pyramid_clone();
|
||||
uint32_t blocks[5];
|
||||
uint8_t *bs = calloc(128, sizeof(uint8_t));
|
||||
if (bs == NULL) {
|
||||
return PM3_EMALLOC;
|
||||
}
|
||||
|
||||
if (sscanf(Cmd, "%u %u", &fc, &cn) != 2) return usage_lf_pyramid_clone();
|
||||
|
||||
facilitycode = (fc & 0x000000FF);
|
||||
cardnumber = (cn & 0x0000FFFF);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue