Fix potential issues
Change-Id: Ifc22e31b7e3e0028914458ce71d94f5d4e9c991c
Signed-off-by: jk13 <jihyeok13.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/663
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
SSM_CLEANUP_ASSERT(executeSQL_NoReturn(sstream.str()));
sstream.str("");
}
- m_mtxTriggerId.unlock();
if (strlen(LOCATION_SSM_DB_DUMP) > 0)
{
m_pSQLite3 = NULL;
res = SSM_S_OK;
+
CLEANUP:
+ m_mtxTriggerId.unlock();
return;
}
g_vecQueryEventResults.push_back(queryEventResult);
//TODO: need to modify for notifying proper clients
- OCPlatform::notifyAllObservers(m_hSSMResource);
+ if (OCPlatform::notifyAllObservers(m_hSSMResource) != OC_STACK_OK)
+ return SSM_E_FAIL;
return SSM_S_OK;
}
m_mapResourcePresenceHandles.erase(((OICResourceHandler *)pMessage[1])->m_SSMResource.ip);
}
+ delete m_mapResourceHandler[((OICResourceHandler *)pMessage[1])->m_SSMResource.name];
m_mapResourceHandler.erase(((OICResourceHandler *) pMessage[1])->m_SSMResource.name);
break;
}