diff options
author | Matt Jordan <mjordan@digium.com> | 2016-01-19 19:37:13 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2016-01-19 19:37:13 -0600 |
commit | 113adf336a8715ba28c29e7997a9293f82b92aa4 (patch) | |
tree | 4923fbef724172e25fd2a6c6b2e8201cc20d54ac | |
parent | d604a9afc875f00288438447a2c0a7d70258f14f (diff) | |
parent | b5c13c1545c069d31efd9af709c9f2af85c585a9 (diff) |
Merge "test_threadpool: Wait for each task to complete and fix memory leak." into 13
-rw-r--r-- | tests/test_threadpool.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_threadpool.c b/tests/test_threadpool.c index 42181a25c..afb981be6 100644 --- a/tests/test_threadpool.c +++ b/tests/test_threadpool.c @@ -636,6 +636,14 @@ AST_TEST_DEFINE(threadpool_thread_timeout_thrash) ast_mutex_unlock(&tld->lock); ast_threadpool_push(pool, simple_task, std); + + res = wait_for_completion(test, std); + + ast_free(std); + + if (res == AST_TEST_FAIL) { + goto end; + } } res = wait_until_thread_state(test, tld, 0, 0); |