It is possible to happen segmentation fault if retransmission thread
lock a mutex during CAdeinitSslAdapter function is called
Patch 1: Initial upload
Change-Id: I446aeb2cc9d6cd07d2683984ba2783ab72020c58
Signed-off-by: Joonghwan Lee <jh05.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/16575
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17107
if (g_caSslContext)
{
unregisterTimer(g_caSslContext->timerId);
+ g_caSslContext->timerId= -1;
}
}
#endif
uint32_t listIndex = 0;
uint32_t listLength = 0;
SslEndPoint_t *tep = NULL;
+
+ oc_mutex_lock(g_sslContextMutex);
if (NULL == g_caSslContext)
{
OIC_LOG(ERROR, NET_SSL_TAG, "Context is NULL. Stop retransmission");
+ oc_mutex_unlock(g_sslContextMutex);
return -1;
}
- oc_mutex_lock(g_sslContextMutex);
+
if (g_caSslContext->timerId != -1)
{
//clear previous timer