Putting check guard if thread already destroyed 92/208892/1
authorKush <kush.agrawal@samsung.com>
Thu, 27 Jun 2019 16:33:31 +0000 (22:03 +0530)
committerSudipto Bal <sudipto.bal@samsung.com>
Mon, 1 Jul 2019 06:42:40 +0000 (12:12 +0530)
https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/527/commits/ead7a6d1d2220a5ccbed468dc71c212fc784151e
(cherry picked from ead7a6d1d2220a5ccbed468dc71c212fc784151e)

Change-Id: Id229f4f85ba9b06bfca84f5991d245584cfdfa48
Signed-off-by: Kush <kush.agrawal@samsung.com>
Signed-off-by: Sudipto Bal <sudipto.bal@samsung.com>
resource/csdk/connectivity/src/caqueueingthread.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 0afeed9..05baf0f
@@ -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