]> git.ipfire.org Git - thirdparty/asterisk.git/commit
test_threadpool: Wait for each task to complete and fix memory leak. 51/2051/1
authorJoshua Colp <jcolp@digium.com>
Tue, 19 Jan 2016 23:15:50 +0000 (19:15 -0400)
committerJoshua Colp <jcolp@digium.com>
Tue, 19 Jan 2016 23:18:10 +0000 (19:18 -0400)
commitb5c13c1545c069d31efd9af709c9f2af85c585a9
tree8a5da39464dffe64e1ee7c6bca130a8eb9e7d930
parent80e901396e256e90b7c92abdd17edbf1b02e4104
test_threadpool: Wait for each task to complete and fix memory leak.

This change makes the thread_timeout_thrash unit test wait for
each task to complete. This fixes the problem where the test would
prematurely end when all threads were gone and a new one had to be
started to handle the last task. It also increases the thrasing as
it is now more likely for each task to encounter the above scenario.

This also fixes a memory leak where the data for each task was not
being freed.

ASTERISK-25611 #close

Change-Id: I5017d621a4dc911f509074c16229b86bff2fb3c6
tests/test_threadpool.c