From ed7e99ebc7c50523e5a2c6f21c8f89028348da71 Mon Sep 17 00:00:00 2001 From: J08nY Date: Sat, 3 Feb 2018 20:09:25 +0100 Subject: Fix Valgrind warnings about timeout struct allocations. - Make them dynamically allocated, per thread, not on stack. - Also fix a small invalid read of deallocated generator point. --- test/src/util/test_timeout.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test/src/util/test_timeout.c') diff --git a/test/src/util/test_timeout.c b/test/src/util/test_timeout.c index 21a13b0..adf9b2a 100644 --- a/test/src/util/test_timeout.c +++ b/test/src/util/test_timeout.c @@ -12,7 +12,12 @@ void timeout_setup(void) { timeout_init(); } -TestSuite(timeout, .init = timeout_setup, .fini = default_teardown); +void timeout_teardown(void) { + default_teardown(); + timeout_quit(); +} + +TestSuite(timeout, .init = timeout_setup, .fini = timeout_teardown); Test(timeout, test_timeout_stop) { bool done = false; -- cgit v1.2.3-70-g09d2