mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 02:27:26 -07:00
fix few mem leaks
This commit is contained in:
parent
78c153fe74
commit
1f364106ce
14 changed files with 31 additions and 15 deletions
|
@ -210,14 +210,13 @@ uint8_t GetPskCarrier(const char *str, bool printAns) {
|
|||
}
|
||||
|
||||
uint16_t fc = countFC(bits, size, false);
|
||||
free(bits);
|
||||
carrier = fc & 0xFF;
|
||||
if (carrier != 2 && carrier != 4 && carrier != 8) return 0;
|
||||
if ((fc >> 8) == 10 && carrier == 8) return 0;
|
||||
// Only print this message if we're not looping something
|
||||
if (printAns)
|
||||
PrintAndLogEx(SUCCESS, "Auto-detected PSK carrier rate: %d", carrier);
|
||||
|
||||
free(bits);
|
||||
return carrier;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue