Commit 187dab39 authored by sonu1.yadav's avatar sonu1.yadav Committed by Erich Keane

Fix for IOT-613 issue.

Problem: When SIGINT signal is raised, occlient called OCStop(). OCStop() function called deleteResource() to delete the resources. deleteResource() takes OCResource* as first argument and dont check the NULL value.

Fix: Null check for argument in deleteResource().

Change-Id: I1f71bc5f90ef7199bf33da7157c8e52d2ffe94dd
Signed-off-by: default avatarsonu1.yadav <sonu1.yadav@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1687Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: default avatarOmkar Hegde <omkar.m.hegde@intel.com>
Reviewed-by: default avatarErich Keane <erich.keane@intel.com>
parent 8642d57d
......@@ -3375,6 +3375,11 @@ OCStackResult deleteResource(OCResource *resource)
{
OCResource *prev = NULL;
OCResource *temp = NULL;
if(!resource)
{
OC_LOG_V(DEBUG,TAG,"resource is NULL");
return OC_STACK_INVALID_PARAM;
}
OC_LOG_V (INFO, TAG, "Deleting resource %s", resource->uri);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment