mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
fix: mem leaks.
This commit is contained in:
parent
44392c6afc
commit
6d63b3fbed
9 changed files with 28 additions and 12 deletions
|
@ -1982,6 +1982,7 @@ int CmdHF14AMfURestore(const char *Cmd){
|
|||
uint8_t *dump = calloc(fsize, sizeof(uint8_t));
|
||||
if ( !dump ) {
|
||||
PrintAndLogEx(WARNING, "Failed to allocate memory");
|
||||
fclose(f);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1990,6 +1991,7 @@ int CmdHF14AMfURestore(const char *Cmd){
|
|||
fclose(f);
|
||||
if ( bytes_read < 48 ) {
|
||||
PrintAndLogEx(WARNING, "Error, dump file is too small");
|
||||
free(dump);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue