From: Kush Date: Thu, 27 Jun 2019 16:33:31 +0000 (+0530) Subject: Putting check guard if thread already destroyed X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a0117be0c33f0ae53efd9bac369efe110740db1b;p=platform%2Fupstream%2Fiotivity.git Putting check guard if thread already destroyed https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/527/commits/ead7a6d1d2220a5ccbed468dc71c212fc784151e (cherry picked from ead7a6d1d2220a5ccbed468dc71c212fc784151e) Change-Id: Id229f4f85ba9b06bfca84f5991d245584cfdfa48 Signed-off-by: Kush Signed-off-by: Sudipto Bal --- diff --git a/resource/csdk/connectivity/src/caqueueingthread.c b/resource/csdk/connectivity/src/caqueueingthread.c old mode 100644 new mode 100755 index 0afeed9..05baf0f --- a/resource/csdk/connectivity/src/caqueueingthread.c +++ b/resource/csdk/connectivity/src/caqueueingthread.c @@ -52,6 +52,12 @@ static void CAQueueingThreadBaseRoutine(void *threadValue) return; } + if (NULL == thread->threadMutex || NULL == thread->threadCond || NULL == thread->dataQueue) + { + OIC_LOG(ERROR, TAG, "thread data was already destroyed"); + return; + } + while (!thread->isStop) { // mutex lock