mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
free args
This commit is contained in:
parent
feae472a41
commit
f2078ec0c2
1 changed files with 7 additions and 2 deletions
|
@ -218,7 +218,7 @@ static void *brute_thread(void *arguments) {
|
|||
//int shift = (int)arg;
|
||||
struct thread_args *args = (struct thread_args *) arguments;
|
||||
|
||||
struct Crypto1State *revstate;
|
||||
struct Crypto1State *revstate = NULL;
|
||||
uint64_t key; // recovered key candidate
|
||||
uint32_t ks2; // keystream used to encrypt reader response
|
||||
uint32_t ks3; // keystream used to encrypt tag response
|
||||
|
@ -234,7 +234,9 @@ static void *brute_thread(void *arguments) {
|
|||
for (count = args->idx; count < 0xFFFF; count += thread_count - 1) {
|
||||
|
||||
found = global_found;
|
||||
if (found) break;
|
||||
if (found) {
|
||||
break;
|
||||
}
|
||||
|
||||
nt = count << 16 | prng_successor(count, 16);
|
||||
|
||||
|
@ -277,6 +279,7 @@ static void *brute_thread(void *arguments) {
|
|||
if (!isOK) {
|
||||
printf("<-- not a valid cmd\n");
|
||||
pthread_mutex_unlock(&print_lock);
|
||||
free(revstate);
|
||||
continue;
|
||||
} else {
|
||||
printf("<-- Valid cmd\n");
|
||||
|
@ -302,6 +305,8 @@ static void *brute_thread(void *arguments) {
|
|||
pthread_mutex_unlock(&print_lock);
|
||||
}
|
||||
}
|
||||
|
||||
free(args);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue