fix few mem leaks
This commit is contained in:
1 parent
78c153fe74
commit
1f364106ce
14 files changed
+31
-15
No files matched your search
+1
-2
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user