mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
fix resource leaks
This commit is contained in:
parent
328e5461f8
commit
0cc7373655
1 changed files with 4 additions and 0 deletions
|
@ -382,6 +382,7 @@ int CmdEM4x50Brute(const char *Cmd) {
|
||||||
etd.bruteforce_mode = BRUTEFORCE_MODE_CHARSET;
|
etd.bruteforce_mode = BRUTEFORCE_MODE_CHARSET;
|
||||||
} else {
|
} else {
|
||||||
PrintAndLogEx(FAILED, "Unknown bruteforce mode: %s", mode);
|
PrintAndLogEx(FAILED, "Unknown bruteforce mode: %s", mode);
|
||||||
|
CLIParserFree(ctx);
|
||||||
return PM3_EINVARG;
|
return PM3_EINVARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -396,11 +397,13 @@ int CmdEM4x50Brute(const char *Cmd) {
|
||||||
|
|
||||||
if (begin_len != 4) {
|
if (begin_len != 4) {
|
||||||
PrintAndLogEx(FAILED, "'begin' parameter must be 4 bytes");
|
PrintAndLogEx(FAILED, "'begin' parameter must be 4 bytes");
|
||||||
|
CLIParserFree(ctx);
|
||||||
return PM3_EINVARG;
|
return PM3_EINVARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (end_len != 4) {
|
if (end_len != 4) {
|
||||||
PrintAndLogEx(FAILED, "'end' parameter must be 4 bytes");
|
PrintAndLogEx(FAILED, "'end' parameter must be 4 bytes");
|
||||||
|
CLIParserFree(ctx);
|
||||||
return PM3_EINVARG;
|
return PM3_EINVARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -417,6 +420,7 @@ int CmdEM4x50Brute(const char *Cmd) {
|
||||||
|
|
||||||
if (etd.bruteforce_charset == 0) {
|
if (etd.bruteforce_charset == 0) {
|
||||||
PrintAndLogEx(FAILED, "Please enable at least one charset when using charset bruteforce mode.");
|
PrintAndLogEx(FAILED, "Please enable at least one charset when using charset bruteforce mode.");
|
||||||
|
CLIParserFree(ctx);
|
||||||
return PM3_EINVARG;
|
return PM3_EINVARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue