Fix some missing frees, null dereferences and missing initialisation picked up by clang-analyzer
This commit is contained in:
1 parent
5db2276602
commit
d2d6f80d11
11 files changed
+24
-15
No files matched your search
@@ -493,6 +493,8 @@ float brute_force_benchmark(void) {
|
||||
|
||||
if (!read_bench_data(test_candidates)) {
|
||||
PrintAndLogEx(NORMAL, "Couldn't read benchmark data. Assuming brute force rate of %1.0f states per second", DEFAULT_BRUTE_FORCE_RATE);
|
||||
free(test_candidates[0].states[ODD_STATE]);
|
||||
free(test_candidates[0].states[EVEN_STATE]);
|
||||
return DEFAULT_BRUTE_FORCE_RATE;
|
||||
}
|
||||
|
||||
@@ -515,5 +517,3 @@ float brute_force_benchmark(void) {
|
||||
test_candidates[0].len[EVEN_STATE] = 0;
|
||||
return bf_rate;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user