Add pthread_join() in case of failure of ca_thread_pool_add_task()
authorhyuna0213.jo <hyuna0213.jo@samsung.com>
Tue, 29 Nov 2016 08:08:38 +0000 (17:08 +0900)
committerZiran Sun <ziran.sun@samsung.com>
Tue, 29 Nov 2016 14:21:35 +0000 (14:21 +0000)
commit796e5b2aa38b4c808deb8f9d264faba4b5b27f1e
treedb7ae3a88e79905a49c8f8b9c3612217d09964bc
parent6dbd734ef4ca54d49ae474f8e7291a54e70cbcbf
Add pthread_join() in case of failure of ca_thread_pool_add_task()

In case of failure, we should call pthread_join() to free memory or
other resources that were allocated to the target thread.

Change-Id: Iabcb25751301b8cdb95565355cc0b6d3cffafc1d
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/14889
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jaehong Jo <jaehong.jo@samsung.com>
Reviewed-by: jihwan seo <jihwan.seo@samsung.com>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
resource/csdk/connectivity/common/src/cathreadpool_pthreads.c