Added memory deallocation of Consumer main thread handle.
authorKIM JungYong <jyong2.kim@samsung.com>
Thu, 28 Jul 2016 09:49:44 +0000 (18:49 +0900)
committerUze Choi <uzchoi@samsung.com>
Fri, 29 Jul 2016 07:11:13 +0000 (07:11 +0000)
When consumer service stopped,
consumer thread handle should de-allocate at memory
because it was allocated the way of dynamic-allocation.

Thread handle is de-allocated on NSDestroyThreadHandle().

Change-Id: I01d773892c6f6d79b833036df8f078a4f6df0ce7
Signed-off-by: KIM JungYong <jyong2.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/9831
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/notification/src/consumer/NSThread.c

index 70bd376..adda254 100644 (file)
@@ -97,6 +97,8 @@ void NSDestroyThreadHandle(NSConsumerThread * handle)
     pthread_mutex_destroy(&(handle->mutex));
     pthread_mutexattr_destroy(&(handle->mutex_attr));
 
+    NSOICFree(handle);
+
     pthread_mutex_unlock(&g_create_mutex);
 }