mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 22:03:42 -07:00
Fix memory leak
This commit is contained in:
parent
b30f8ae37f
commit
9dd845d859
1 changed files with 4 additions and 5 deletions
|
@ -433,6 +433,8 @@ static int CmdVASReader(const char *Cmd) {
|
||||||
return PM3_EINVARG;
|
return PM3_EINVARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(keyData);
|
||||||
|
|
||||||
struct arg_str *urlArg = arg_get_str(ctx, 3);
|
struct arg_str *urlArg = arg_get_str(ctx, 3);
|
||||||
int urlLen = arg_get_str_len(ctx, 3);
|
int urlLen = arg_get_str_len(ctx, 3);
|
||||||
const char *url = NULL;
|
const char *url = NULL;
|
||||||
|
@ -523,6 +525,8 @@ static int CmdVASDecrypt(const char *Cmd) {
|
||||||
return PM3_EINVARG;
|
return PM3_EINVARG;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(keyData);
|
||||||
|
|
||||||
uint8_t message[64] = {0};
|
uint8_t message[64] = {0};
|
||||||
size_t messageLen = 0;
|
size_t messageLen = 0;
|
||||||
uint32_t timestamp = 0;
|
uint32_t timestamp = 0;
|
||||||
|
@ -541,17 +545,12 @@ static int CmdVASDecrypt(const char *Cmd) {
|
||||||
return PM3_SUCCESS;
|
return PM3_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int CmdVASSim(const char *Cmd) {
|
|
||||||
return PM3_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int CmdHelp(const char *Cmd);
|
static int CmdHelp(const char *Cmd);
|
||||||
|
|
||||||
static command_t CommandTable[] = {
|
static command_t CommandTable[] = {
|
||||||
{"--------", CmdHelp, AlwaysAvailable, "----------- " _CYAN_("Value Added Service") " -----------"},
|
{"--------", CmdHelp, AlwaysAvailable, "----------- " _CYAN_("Value Added Service") " -----------"},
|
||||||
{"reader", CmdVASReader, IfPm3Iso14443a, "Read and decrypt VAS message"},
|
{"reader", CmdVASReader, IfPm3Iso14443a, "Read and decrypt VAS message"},
|
||||||
{"decrypt", CmdVASDecrypt, AlwaysAvailable, "Decrypt a previously captured VAS cryptogram"},
|
{"decrypt", CmdVASDecrypt, AlwaysAvailable, "Decrypt a previously captured VAS cryptogram"},
|
||||||
{"sim", CmdVASSim, IfPm3Iso14443a, "Simulate a VAS mobile credential"},
|
|
||||||
{"--------", CmdHelp, AlwaysAvailable, "----------------- " _CYAN_("General") " -----------------"},
|
{"--------", CmdHelp, AlwaysAvailable, "----------------- " _CYAN_("General") " -----------------"},
|
||||||
{"help", CmdHelp, AlwaysAvailable, "This help"},
|
{"help", CmdHelp, AlwaysAvailable, "This help"},
|
||||||
{NULL, NULL, NULL, NULL}
|
{NULL, NULL, NULL, NULL}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue