mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-05-12 11:18:11 -07:00
fix cid #404827 - resource leak
This commit is contained in:
@@ -252,6 +252,7 @@ int CmdEM4x70Brute(const char *Cmd) {
|
||||
int addr = arg_get_int_def(ctx, 2, 0);
|
||||
if (addr < 7 || addr > 9) {
|
||||
PrintAndLogEx(FAILED, "block has to be within range [7, 9] got: %d", addr);
|
||||
CLIParserFree(ctx);
|
||||
return PM3_EINVARG;
|
||||
}
|
||||
etd.address = (uint8_t) addr;
|
||||
@@ -265,8 +266,8 @@ int CmdEM4x70Brute(const char *Cmd) {
|
||||
uint32_t start_key = 0;
|
||||
int res = arg_get_u32_hexstr_def_nlen(ctx, 5, 0, &start_key, 2, true);
|
||||
if (res == 2) {
|
||||
CLIParserFree(ctx);
|
||||
PrintAndLogEx(WARNING, "start key parameter must be in range [0, FFFF]");
|
||||
CLIParserFree(ctx);
|
||||
return PM3_EINVARG;
|
||||
}
|
||||
etd.start_key = start_key;
|
||||
|
||||
Reference in New Issue
Block a user