diff --git a/lib/src/phy/fec/test/viterbi_test.c b/lib/src/phy/fec/test/viterbi_test.c index 28c60bce6..e4cf6f312 100644 --- a/lib/src/phy/fec/test/viterbi_test.c +++ b/lib/src/phy/fec/test/viterbi_test.c @@ -279,6 +279,7 @@ int main(int argc, char **argv) { free(llr); free(llr_c); free(data_rx); + free(data_rx2); if (snr_points == 1) { int expected_errors = get_expected_errors(nof_frames, seed, frame_length, tail_biting, ebno_db); diff --git a/lib/src/phy/modem/test/modem_test.c b/lib/src/phy/modem/test/modem_test.c index 600115386..ed9bef522 100644 --- a/lib/src/phy/modem/test/modem_test.c +++ b/lib/src/phy/modem/test/modem_test.c @@ -197,6 +197,7 @@ int main(int argc, char **argv) { } } + free(llr2); free(llr); free(symbols); free(symbols_bytes); diff --git a/lib/test/common/timeout_test.cc b/lib/test/common/timeout_test.cc index c2451cdb0..4bde95f66 100644 --- a/lib/test/common/timeout_test.cc +++ b/lib/test/common/timeout_test.cc @@ -89,7 +89,7 @@ int timer_thread_test() printf("Target duration: %dms, started: %ld:%ld, ended: %ld:%ld, actual duration %dms\n", duration_msec, c.start_time[1].tv_sec, c.start_time[1].tv_usec, c.start_time[2].tv_sec, c.start_time[2].tv_usec, diff_ms); - result = (duration_msec - result_tolerance <= diff_ms < duration_msec + result_tolerance); + result = ((duration_msec - result_tolerance) < diff_ms || diff_ms < (duration_msec + result_tolerance)); if(result) { printf("Timer thread test passed\n");