* [CONPRO-1285]Crash in OCProcessPresence
There is a issue after freeing the clientcb
we are again accessing it.It can possibly crash.
So, to avoid this scenario we are using LL_FOREACH_SAFE
to iterate the list
Signed-off-by: agrkush <kush.agrawal@samsung.com>
* Update ocstack.c
https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/298
(cherry picked from commit
578c6918d40d5bded028266ceb3a4aaf68d33623)
Signed-off-by: Amit KS <amit.s12@samsung.com>
Change-Id: Id514a242e34d7a20df2845c09a757b3d26c9604a
// to most purposes. Uncomment as needed.
//OIC_LOG(INFO, TAG, "Entering RequestPresence");
ClientCB* cbNode = NULL;
+ ClientCB* tempcbNode = NULL;
OCClientResponse clientResponse;
OCStackApplicationResult cbResult = OC_STACK_DELETE_TRANSACTION;
- LL_FOREACH(cbList, cbNode)
+ LL_FOREACH_SAFE(cbList, cbNode, tempcbNode)
{
if (OC_REST_PRESENCE != cbNode->method || !cbNode->presence)
{