From: Kush Date: Thu, 27 Jun 2019 16:33:31 +0000 (+0530) Subject: Putting check guard if thread already destroyed X-Git-Tag: accepted/tizen/unified/20190702.114916~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fupstream%2Fiotivity.git;a=commitdiff_plain;h=93ecb1a887940df2ab167cd0bcf2f83b2adef4f0 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